Class: Pra::PullRequest
- Inherits:
-
Object
- Object
- Pra::PullRequest
- Defined in:
- lib/pra/pull_request.rb
Instance Attribute Summary collapse
-
#assignee ⇒ Object
Returns the value of attribute assignee.
-
#author ⇒ Object
Returns the value of attribute author.
-
#from_reference ⇒ Object
Returns the value of attribute from_reference.
-
#labels ⇒ Object
Returns the value of attribute labels.
-
#link ⇒ Object
Returns the value of attribute link.
-
#repository ⇒ Object
Returns the value of attribute repository.
-
#service_id ⇒ Object
Returns the value of attribute service_id.
-
#title ⇒ Object
Returns the value of attribute title.
-
#to_reference ⇒ Object
Returns the value of attribute to_reference.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ PullRequest
constructor
A new instance of PullRequest.
Constructor Details
#initialize(attributes = {}) ⇒ PullRequest
Returns a new instance of PullRequest.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/pra/pull_request.rb', line 8 def initialize(attributes={}) @title = attributes[:title] @from_reference = attributes[:from_reference] @to_reference = attributes[:to_reference] @author = attributes[:author] @assignee = attributes[:assignee] @link = attributes[:link] @service_id = attributes[:service_id] @repository = attributes[:repository] @labels = attributes[:labels] || [] @updated_at = DateTime.parse(attributes[:updated_at]) unless attributes[:updated_at].nil? end |
Instance Attribute Details
#assignee ⇒ Object
Returns the value of attribute assignee.
5 6 7 |
# File 'lib/pra/pull_request.rb', line 5 def assignee @assignee end |
#author ⇒ Object
Returns the value of attribute author.
5 6 7 |
# File 'lib/pra/pull_request.rb', line 5 def @author end |
#from_reference ⇒ Object
Returns the value of attribute from_reference.
5 6 7 |
# File 'lib/pra/pull_request.rb', line 5 def from_reference @from_reference end |
#labels ⇒ Object
Returns the value of attribute labels.
5 6 7 |
# File 'lib/pra/pull_request.rb', line 5 def labels @labels end |
#link ⇒ Object
Returns the value of attribute link.
5 6 7 |
# File 'lib/pra/pull_request.rb', line 5 def link @link end |
#repository ⇒ Object
Returns the value of attribute repository.
5 6 7 |
# File 'lib/pra/pull_request.rb', line 5 def repository @repository end |
#service_id ⇒ Object
Returns the value of attribute service_id.
5 6 7 |
# File 'lib/pra/pull_request.rb', line 5 def service_id @service_id end |
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'lib/pra/pull_request.rb', line 5 def title @title end |
#to_reference ⇒ Object
Returns the value of attribute to_reference.
5 6 7 |
# File 'lib/pra/pull_request.rb', line 5 def to_reference @to_reference end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
5 6 7 |
# File 'lib/pra/pull_request.rb', line 5 def updated_at @updated_at end |