Class: SinglePlatform::MenuItem
- Inherits:
-
Object
- Object
- SinglePlatform::MenuItem
- Defined in:
- lib/single_platform/menu_item.rb
Instance Attribute Summary collapse
-
#allergen_free ⇒ Object
readonly
Returns the value of attribute allergen_free.
-
#allergens ⇒ Object
readonly
Returns the value of attribute allergens.
-
#desc ⇒ Object
readonly
Returns the value of attribute desc.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#menu_section ⇒ Object
readonly
Returns the value of attribute menu_section.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#order_num ⇒ Object
readonly
Returns the value of attribute order_num.
-
#prices ⇒ Object
readonly
Returns the value of attribute prices.
-
#restrictions ⇒ Object
readonly
Returns the value of attribute restrictions.
-
#spicy ⇒ Object
readonly
Returns the value of attribute spicy.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(menu_section, data) ⇒ MenuItem
constructor
A new instance of MenuItem.
Constructor Details
#initialize(menu_section, data) ⇒ MenuItem
Returns a new instance of MenuItem.
6 7 8 9 10 11 |
# File 'lib/single_platform/menu_item.rb', line 6 def initialize(, data) @menu_section = data.each do |key, value| instance_variable_set :"@#{key.underscore}", value end end |
Instance Attribute Details
#allergen_free ⇒ Object (readonly)
Returns the value of attribute allergen_free.
4 5 6 |
# File 'lib/single_platform/menu_item.rb', line 4 def allergen_free @allergen_free end |
#allergens ⇒ Object (readonly)
Returns the value of attribute allergens.
4 5 6 |
# File 'lib/single_platform/menu_item.rb', line 4 def allergens @allergens end |
#desc ⇒ Object (readonly)
Returns the value of attribute desc.
4 5 6 |
# File 'lib/single_platform/menu_item.rb', line 4 def desc @desc end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/single_platform/menu_item.rb', line 4 def id @id end |
#menu_section ⇒ Object (readonly)
Returns the value of attribute menu_section.
3 4 5 |
# File 'lib/single_platform/menu_item.rb', line 3 def @menu_section end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/single_platform/menu_item.rb', line 4 def name @name end |
#order_num ⇒ Object (readonly)
Returns the value of attribute order_num.
4 5 6 |
# File 'lib/single_platform/menu_item.rb', line 4 def order_num @order_num end |
#prices ⇒ Object (readonly)
Returns the value of attribute prices.
4 5 6 |
# File 'lib/single_platform/menu_item.rb', line 4 def prices @prices end |
#restrictions ⇒ Object (readonly)
Returns the value of attribute restrictions.
4 5 6 |
# File 'lib/single_platform/menu_item.rb', line 4 def restrictions @restrictions end |
#spicy ⇒ Object (readonly)
Returns the value of attribute spicy.
4 5 6 |
# File 'lib/single_platform/menu_item.rb', line 4 def spicy @spicy end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
4 5 6 |
# File 'lib/single_platform/menu_item.rb', line 4 def title @title end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/single_platform/menu_item.rb', line 4 def type @type end |