Class: Danger::RemotePullRequest
- Inherits:
-
Object
- Object
- Danger::RemotePullRequest
- Defined in:
- lib/danger/ci_source/support/remote_pull_request.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#head ⇒ Object
readonly
Returns the value of attribute head.
-
#pull_request_id ⇒ Object
readonly
Returns the value of attribute pull_request_id.
-
#sha ⇒ Object
readonly
Returns the value of attribute sha.
Instance Method Summary collapse
-
#initialize(pull_request_id, head, base) ⇒ RemotePullRequest
constructor
A new instance of RemotePullRequest.
- #valid? ⇒ Boolean
Constructor Details
#initialize(pull_request_id, head, base) ⇒ RemotePullRequest
Returns a new instance of RemotePullRequest.
5 6 7 8 9 |
# File 'lib/danger/ci_source/support/remote_pull_request.rb', line 5 def initialize(pull_request_id, head, base) @pull_request_id = pull_request_id @head = head @base = base end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
3 4 5 |
# File 'lib/danger/ci_source/support/remote_pull_request.rb', line 3 def base @base end |
#head ⇒ Object (readonly)
Returns the value of attribute head.
3 4 5 |
# File 'lib/danger/ci_source/support/remote_pull_request.rb', line 3 def head @head end |
#pull_request_id ⇒ Object (readonly)
Returns the value of attribute pull_request_id.
3 4 5 |
# File 'lib/danger/ci_source/support/remote_pull_request.rb', line 3 def pull_request_id @pull_request_id end |
#sha ⇒ Object (readonly)
Returns the value of attribute sha.
3 4 5 |
# File 'lib/danger/ci_source/support/remote_pull_request.rb', line 3 def sha @sha end |
Instance Method Details
#valid? ⇒ Boolean
11 12 13 |
# File 'lib/danger/ci_source/support/remote_pull_request.rb', line 11 def valid? pull_request_id && head && base end |