Class: Rlocu::Menu::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/rlocu/menu.rb

Direct Known Subclasses

MenuItem

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#descriptionObject (readonly)

Returns the value of attribute description.



88
89
90
# File 'lib/rlocu/menu.rb', line 88

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



88
89
90
# File 'lib/rlocu/menu.rb', line 88

def name
  @name
end

#option_groupsObject

Returns the value of attribute option_groups.



88
89
90
# File 'lib/rlocu/menu.rb', line 88

def option_groups
  @option_groups
end

#priceObject (readonly)

Returns the value of attribute price.



88
89
90
# File 'lib/rlocu/menu.rb', line 88

def price
  @price
end

#typeObject (readonly)

Returns the value of attribute type.



88
89
90
# File 'lib/rlocu/menu.rb', line 88

def type
  @type
end