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.
5 6 7 8 9 10 11 |
# File 'lib/ninny/repository/pull_request.rb', line 5 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.
4 5 6 |
# File 'lib/ninny/repository/pull_request.rb', line 4 def branch @branch end |
#comment_lambda ⇒ Object
Returns the value of attribute comment_lambda.
4 5 6 |
# File 'lib/ninny/repository/pull_request.rb', line 4 def comment_lambda @comment_lambda end |
#description ⇒ Object
Returns the value of attribute description.
4 5 6 |
# File 'lib/ninny/repository/pull_request.rb', line 4 def description @description end |
#number ⇒ Object
Returns the value of attribute number.
4 5 6 |
# File 'lib/ninny/repository/pull_request.rb', line 4 def number @number end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/ninny/repository/pull_request.rb', line 4 def title @title end |
Instance Method Details
#write_comment(body) ⇒ Object
13 14 15 |
# File 'lib/ninny/repository/pull_request.rb', line 13 def write_comment(body) self.comment_lambda.call(body) end |