Class: Ninny::Repository::PullRequest
- Inherits:
-
Object
- Object
- Ninny::Repository::PullRequest
- Defined in:
- lib/ninny/repository/pull_request.rb
Instance Attribute Summary collapse
-
#branch ⇒ Object
Returns the value of attribute branch.
-
#comment_lambda ⇒ Object
Returns the value of attribute comment_lambda.
-
#description ⇒ Object
Returns the value of attribute description.
-
#number ⇒ Object
Returns the value of attribute number.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ PullRequest
constructor
A new instance of PullRequest.
- #write_comment(body) ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ PullRequest
Returns a new instance of PullRequest.
8 9 10 11 12 13 14 |
# File 'lib/ninny/repository/pull_request.rb', line 8 def initialize(opts = {}) self.number = opts[:number] self.title = opts[:title] self.description = opts[:description] self.branch = opts[:branch] self.comment_lambda = opts[:comment_lambda] end |
Instance Attribute Details
#branch ⇒ Object
Returns the value of attribute branch.
6 7 8 |
# File 'lib/ninny/repository/pull_request.rb', line 6 def branch @branch end |
#comment_lambda ⇒ Object
Returns the value of attribute comment_lambda.
6 7 8 |
# File 'lib/ninny/repository/pull_request.rb', line 6 def comment_lambda @comment_lambda end |
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/ninny/repository/pull_request.rb', line 6 def description @description end |
#number ⇒ Object
Returns the value of attribute number.
6 7 8 |
# File 'lib/ninny/repository/pull_request.rb', line 6 def number @number end |
#title ⇒ Object
Returns the value of attribute title.
6 7 8 |
# File 'lib/ninny/repository/pull_request.rb', line 6 def title @title end |
Instance Method Details
#write_comment(body) ⇒ Object
16 17 18 |
# File 'lib/ninny/repository/pull_request.rb', line 16 def write_comment(body) comment_lambda.call(body) end |