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
- #branch ⇒ Object
-
#initialize(repo:, number:) ⇒ PullRequest
constructor
A new instance of PullRequest.
- #remote ⇒ Object
- #remote_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
24 25 26 |
# File 'lib/octo_merge/pull_request.rb', line 24 def ==(other_pull_request) repo == other_pull_request.repo && number == other_pull_request.number end |
#branch ⇒ Object
20 21 22 |
# File 'lib/octo_merge/pull_request.rb', line 20 def branch github_api_result.head.ref end |
#remote ⇒ Object
12 13 14 |
# File 'lib/octo_merge/pull_request.rb', line 12 def remote github_api_result.user.login end |
#remote_url ⇒ Object
16 17 18 |
# File 'lib/octo_merge/pull_request.rb', line 16 def remote_url github_api_result.head.repo.ssh_url end |