Class: Dev::BloomGrowth::Seat
- Defined in:
- lib/firespring_dev_commands/bloom_growth/seat.rb
Overview
Class containing seat information
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data) ⇒ Seat
constructor
A new instance of Seat.
Constructor Details
#initialize(data) ⇒ Seat
Returns a new instance of Seat.
7 8 9 10 11 12 13 |
# File 'lib/firespring_dev_commands/bloom_growth/seat.rb', line 7 def initialize(data) @data = data position = data.dig('Group', 'Position') @id = position&.fetch('Id') @type = position&.fetch('Type') @name = position&.fetch('Name').to_s.strip end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
5 6 7 |
# File 'lib/firespring_dev_commands/bloom_growth/seat.rb', line 5 def data @data end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/firespring_dev_commands/bloom_growth/seat.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/seat.rb', line 5 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/firespring_dev_commands/bloom_growth/seat.rb', line 5 def type @type end |