Class: Rlocu::MenuItem

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

Overview

create a to_s for each that can be over-ridden by the user

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(meta_menu_item) ⇒ MenuItem

Returns a new instance of MenuItem.



77
78
79
80
81
82
83
# File 'lib/rlocu/menu.rb', line 77

def initialize(meta_menu_item)
  @type = meta_menu_item['type']
  @name = meta_menu_item['name']
  @description = meta_menu_item['description']
  @price = meta_menu_item['price']
  self.option_groups = meta_menu_item['option_groups'] 
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



74
75
76
# File 'lib/rlocu/menu.rb', line 74

def description
  @description
end

#nameObject

Returns the value of attribute name.



74
75
76
# File 'lib/rlocu/menu.rb', line 74

def name
  @name
end

#option_groupsObject

Returns the value of attribute option_groups.



75
76
77
# File 'lib/rlocu/menu.rb', line 75

def option_groups
  @option_groups
end

#priceObject

Returns the value of attribute price.



74
75
76
# File 'lib/rlocu/menu.rb', line 74

def price
  @price
end

#typeObject

Returns the value of attribute type.



74
75
76
# File 'lib/rlocu/menu.rb', line 74

def type
  @type
end