Class: Pra::PullRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/pra/pull_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#assigneeObject

Returns the value of attribute assignee.



5
6
7
# File 'lib/pra/pull_request.rb', line 5

def assignee
  @assignee
end

#authorObject

Returns the value of attribute author.



5
6
7
# File 'lib/pra/pull_request.rb', line 5

def author
  @author
end

#from_referenceObject

Returns the value of attribute from_reference.



5
6
7
# File 'lib/pra/pull_request.rb', line 5

def from_reference
  @from_reference
end

#labelsObject

Returns the value of attribute labels.



5
6
7
# File 'lib/pra/pull_request.rb', line 5

def labels
  @labels
end

Returns the value of attribute link.



5
6
7
# File 'lib/pra/pull_request.rb', line 5

def link
  @link
end

#repositoryObject

Returns the value of attribute repository.



5
6
7
# File 'lib/pra/pull_request.rb', line 5

def repository
  @repository
end

#service_idObject

Returns the value of attribute service_id.



5
6
7
# File 'lib/pra/pull_request.rb', line 5

def service_id
  @service_id
end

#titleObject

Returns the value of attribute title.



5
6
7
# File 'lib/pra/pull_request.rb', line 5

def title
  @title
end

#to_referenceObject

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_atObject

Returns the value of attribute updated_at.



5
6
7
# File 'lib/pra/pull_request.rb', line 5

def updated_at
  @updated_at
end