Class: OctoMerge::PullRequest
- Inherits:
-
Object
- Object
- OctoMerge::PullRequest
- Defined in:
- lib/octo_merge/pull_request.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
Instance Method Summary collapse
- #==(other_pull_request) ⇒ Object
- #body ⇒ Object
- #branch ⇒ Object
-
#initialize(repo:, number:) ⇒ PullRequest
constructor
A new instance of PullRequest.
- #remote ⇒ Object
- #remote_url ⇒ Object
- #title ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(repo:, number:) ⇒ PullRequest
Returns a new instance of PullRequest.
7 8 9 10 |
# File 'lib/octo_merge/pull_request.rb', line 7 def initialize(repo:, number:) @repo = repo @number = number.to_s end |
Instance Attribute Details
#number ⇒ Object (readonly)
Returns the value of attribute number.
5 6 7 |
# File 'lib/octo_merge/pull_request.rb', line 5 def number @number end |
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
5 6 7 |
# File 'lib/octo_merge/pull_request.rb', line 5 def repo @repo end |
Instance Method Details
#==(other_pull_request) ⇒ Object
36 37 38 |
# File 'lib/octo_merge/pull_request.rb', line 36 def ==(other_pull_request) repo == other_pull_request.repo && number == other_pull_request.number end |
#body ⇒ Object
32 33 34 |
# File 'lib/octo_merge/pull_request.rb', line 32 def body github_api_result.body end |
#branch ⇒ Object
24 25 26 |
# File 'lib/octo_merge/pull_request.rb', line 24 def branch github_api_result.head.ref end |
#remote ⇒ Object
16 17 18 |
# File 'lib/octo_merge/pull_request.rb', line 16 def remote github_api_result.user.login end |
#remote_url ⇒ Object
20 21 22 |
# File 'lib/octo_merge/pull_request.rb', line 20 def remote_url github_api_result.head.repo.ssh_url end |
#title ⇒ Object
28 29 30 |
# File 'lib/octo_merge/pull_request.rb', line 28 def title github_api_result.title end |
#url ⇒ Object
12 13 14 |
# File 'lib/octo_merge/pull_request.rb', line 12 def url github_api_result.html_url end |