Class: Rlocu::Menu::Item
- Inherits:
-
Object
- Object
- Rlocu::Menu::Item
- Defined in:
- lib/rlocu/menu.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#option_groups ⇒ Object
Returns the value of attribute option_groups.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(item_hash) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(item_hash) ⇒ Item
Returns a new instance of Item.
89 90 91 92 93 94 95 |
# File 'lib/rlocu/menu.rb', line 89 def initialize(item_hash) @type = item_hash['type'] @name = item_hash['name'] @description = item_hash['description'] @price = item_hash['price'] self.option_groups = item_hash['option_groups'] end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
88 89 90 |
# File 'lib/rlocu/menu.rb', line 88 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
88 89 90 |
# File 'lib/rlocu/menu.rb', line 88 def name @name end |
#option_groups ⇒ Object
Returns the value of attribute option_groups.
88 89 90 |
# File 'lib/rlocu/menu.rb', line 88 def option_groups @option_groups end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
88 89 90 |
# File 'lib/rlocu/menu.rb', line 88 def price @price end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
88 89 90 |
# File 'lib/rlocu/menu.rb', line 88 def type @type end |