Class: Rlocu::Option
- Inherits:
-
Object
- Object
- Rlocu::Option
- Defined in:
- lib/rlocu/menu.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
- #price ⇒ Object
Instance Method Summary collapse
-
#initialize(meta_option) ⇒ Option
constructor
A new instance of Option.
- #to_s ⇒ Object
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() @name = ['name'] @price = ['price'] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
111 112 113 |
# File 'lib/rlocu/menu.rb', line 111 def name @name end |
#price ⇒ Object
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_s ⇒ Object
125 126 127 |
# File 'lib/rlocu/menu.rb', line 125 def to_s "#{name} #{price}" end |