Class: Dev::Jira::Parent

Inherits:
Object show all
Defined in:
lib/firespring_dev_commands/jira/parent.rb

Overview

Contains information on the Jira parent issue

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Parent

Returns a new instance of Parent.



7
8
9
10
11
# File 'lib/firespring_dev_commands/jira/parent.rb', line 7

def initialize(data)
  @data = data.parent
  @id = data.parent['key']
  @title = data.parent['fields']['summary']
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



5
6
7
# File 'lib/firespring_dev_commands/jira/parent.rb', line 5

def data
  @data
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/firespring_dev_commands/jira/parent.rb', line 5

def id
  @id
end

#titleObject

Returns the value of attribute title.



5
6
7
# File 'lib/firespring_dev_commands/jira/parent.rb', line 5

def title
  @title
end

Instance Method Details

#to_sObject

Converts the jira parent object to a string representation



14
15
16
# File 'lib/firespring_dev_commands/jira/parent.rb', line 14

def to_s
  "[#{id}] #{title}"
end