Class: Mj::Git::PullRequest
- Inherits:
-
Object
- Object
- Mj::Git::PullRequest
- Defined in:
- lib/mj/git/pull_request.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
- #closed? ⇒ Boolean
-
#initialize(number:, title:, state:, updated_at:, author:) ⇒ PullRequest
constructor
A new instance of PullRequest.
Constructor Details
#initialize(number:, title:, state:, updated_at:, author:) ⇒ PullRequest
Returns a new instance of PullRequest.
12 13 14 15 16 17 18 |
# File 'lib/mj/git/pull_request.rb', line 12 def initialize(number:, title:, state:, updated_at:, author:) @number = number @title = title @state = state @updated_at = updated_at @author = end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
8 9 10 |
# File 'lib/mj/git/pull_request.rb', line 8 def @author end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
6 7 8 |
# File 'lib/mj/git/pull_request.rb', line 6 def number @number end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
9 10 11 |
# File 'lib/mj/git/pull_request.rb', line 9 def state @state end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
7 8 9 |
# File 'lib/mj/git/pull_request.rb', line 7 def title @title end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
10 11 12 |
# File 'lib/mj/git/pull_request.rb', line 10 def updated_at @updated_at end |
Instance Method Details
#closed? ⇒ Boolean
20 21 22 |
# File 'lib/mj/git/pull_request.rb', line 20 def closed? state == "MERGED" || state == "CLOSED" end |