Class: SinglePlatform::MenuItem

Inherits:
Object
  • Object
show all
Defined in:
lib/single_platform/menu_item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(menu_section, data)
  @menu_section = menu_section
  data.each do |key, value|
    instance_variable_set :"@#{key.underscore}", value
  end
end

Instance Attribute Details

#allergen_freeObject (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

#allergensObject (readonly)

Returns the value of attribute allergens.



4
5
6
# File 'lib/single_platform/menu_item.rb', line 4

def allergens
  @allergens
end

#descObject (readonly)

Returns the value of attribute desc.



4
5
6
# File 'lib/single_platform/menu_item.rb', line 4

def desc
  @desc
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/single_platform/menu_item.rb', line 4

def id
  @id
end

Returns the value of attribute menu_section.



3
4
5
# File 'lib/single_platform/menu_item.rb', line 3

def menu_section
  @menu_section
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/single_platform/menu_item.rb', line 4

def name
  @name
end

#order_numObject (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

#pricesObject (readonly)

Returns the value of attribute prices.



4
5
6
# File 'lib/single_platform/menu_item.rb', line 4

def prices
  @prices
end

#restrictionsObject (readonly)

Returns the value of attribute restrictions.



4
5
6
# File 'lib/single_platform/menu_item.rb', line 4

def restrictions
  @restrictions
end

#spicyObject (readonly)

Returns the value of attribute spicy.



4
5
6
# File 'lib/single_platform/menu_item.rb', line 4

def spicy
  @spicy
end

#titleObject (readonly)

Returns the value of attribute title.



4
5
6
# File 'lib/single_platform/menu_item.rb', line 4

def title
  @title
end

#typeObject (readonly)

Returns the value of attribute type.



4
5
6
# File 'lib/single_platform/menu_item.rb', line 4

def type
  @type
end