Class: Rlocu::Option

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(meta_option) ⇒ Option

Returns a new instance of Option.



114
115
116
117
# File 'lib/rlocu/menu.rb', line 114

def initialize(meta_option)
  @name = meta_option['name']
  @price = meta_option['price']
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



111
112
113
# File 'lib/rlocu/menu.rb', line 111

def name
  @name
end

#priceObject



119
120
121
122
123
# File 'lib/rlocu/menu.rb', line 119

def price
  # price can be relative indicated by a + in the price
  # not currently doing anything w it 
  @price
end

Instance Method Details

#to_sObject



125
126
127
# File 'lib/rlocu/menu.rb', line 125

def to_s
  "#{name} #{price}"
end