Class: Dev::BloomGrowth::Rock
- Defined in:
- lib/firespring_dev_commands/bloom_growth/rock.rb
Overview
Class containing rock information
Instance Attribute Summary collapse
-
#complete ⇒ Object
Returns the value of attribute complete.
-
#completion_id ⇒ Object
Returns the value of attribute completion_id.
-
#created ⇒ Object
Returns the value of attribute created.
-
#data ⇒ Object
Returns the value of attribute data.
-
#due ⇒ Object
Returns the value of attribute due.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#state ⇒ Object
readonly
Convert the completion_id bloom growth gives us into a text version.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data) ⇒ Rock
constructor
A new instance of Rock.
Constructor Details
#initialize(data) ⇒ Rock
Returns a new instance of Rock.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/firespring_dev_commands/bloom_growth/rock.rb', line 8 def initialize(data) @data = data @id = data['Id'] @type = data['Type'] @name = data['Name'].to_s.strip @owner = User.new(data['Owner']) if data['Owner'] @complete = data['Complete'] @completion_id = data['Completion'] @created = Time.parse(data['CreateTime']) if data['CreateTime'] @due = Time.parse(data['DueDate']) if data['DueDate'] @archived = data['Archived'] end |
Instance Attribute Details
#complete ⇒ Object
Returns the value of attribute complete.
5 6 7 |
# File 'lib/firespring_dev_commands/bloom_growth/rock.rb', line 5 def complete @complete end |
#completion_id ⇒ Object
Returns the value of attribute completion_id.
5 6 7 |
# File 'lib/firespring_dev_commands/bloom_growth/rock.rb', line 5 def completion_id @completion_id end |
#created ⇒ Object
Returns the value of attribute created.
5 6 7 |
# File 'lib/firespring_dev_commands/bloom_growth/rock.rb', line 5 def created @created end |
#data ⇒ Object
Returns the value of attribute data.
5 6 7 |
# File 'lib/firespring_dev_commands/bloom_growth/rock.rb', line 5 def data @data end |
#due ⇒ Object
Returns the value of attribute due.
5 6 7 |
# File 'lib/firespring_dev_commands/bloom_growth/rock.rb', line 5 def due @due end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/firespring_dev_commands/bloom_growth/rock.rb', line 5 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/firespring_dev_commands/bloom_growth/rock.rb', line 5 def name @name end |
#owner ⇒ Object
Returns the value of attribute owner.
5 6 7 |
# File 'lib/firespring_dev_commands/bloom_growth/rock.rb', line 5 def owner @owner end |
#state ⇒ Object (readonly)
Convert the completion_id bloom growth gives us into a text version
22 23 24 |
# File 'lib/firespring_dev_commands/bloom_growth/rock.rb', line 22 def state @state end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/firespring_dev_commands/bloom_growth/rock.rb', line 5 def type @type end |