Class: Policial::PullRequest
- Inherits:
-
Object
- Object
- Policial::PullRequest
- Defined in:
- lib/policial/pull_request.rb
Overview
Public: A GibHub Pull Request.
Instance Attribute Summary collapse
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #comments ⇒ Object
- #files ⇒ Object
- #head_commit ⇒ Object
-
#initialize(repo:, number:, head_sha:, user: nil) ⇒ PullRequest
constructor
A new instance of PullRequest.
Constructor Details
#initialize(repo:, number:, head_sha:, user: nil) ⇒ PullRequest
Returns a new instance of PullRequest.
6 7 8 9 10 11 |
# File 'lib/policial/pull_request.rb', line 6 def initialize(repo:, number:, head_sha:, user: nil) @repo = repo @number = number @head_sha = head_sha @user = user end |
Instance Attribute Details
#number ⇒ Object (readonly)
Returns the value of attribute number.
4 5 6 |
# File 'lib/policial/pull_request.rb', line 4 def number @number end |
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
4 5 6 |
# File 'lib/policial/pull_request.rb', line 4 def repo @repo end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
4 5 6 |
# File 'lib/policial/pull_request.rb', line 4 def user @user end |
Instance Method Details
#comments ⇒ Object
13 14 15 |
# File 'lib/policial/pull_request.rb', line 13 def comments @comments ||= fetch_comments end |