Class: MenuFood
Instance Attribute Summary collapse
Attributes inherited from Diet
#dip, #pchdt, #pfts, #pprtn, #rcps, #ttl, #vct
Instance Method Summary collapse
-
#initialize(food, ttl, dip, vct, pprtn, pfts, pchdt) ⇒ MenuFood
constructor
A new instance of MenuFood.
-
#to_s ⇒ String
String con el contenido de la lista.
Methods inherited from Diet
Constructor Details
#initialize(food, ttl, dip, vct, pprtn, pfts, pchdt) ⇒ MenuFood
Returns a new instance of MenuFood
26 27 28 29 30 31 32 |
# File 'lib/prct06/menuFood.rb', line 26 def initialize(food, ttl, dip, vct, pprtn, pfts, pchdt) @food = food super(ttl, dip, vct, pprtn, pfts, pchdt) end |
Instance Attribute Details
#M ⇒ Object
19 20 21 |
# File 'lib/prct06/menuFood.rb', line 19 def food @food end |
Instance Method Details
#to_s ⇒ String
Returns String con el contenido de la lista
37 38 39 40 41 42 |
# File 'lib/prct06/menuFood.rb', line 37 def to_s() tmp = super.to_s + "Alimentos: #{@food}\n" tmp end |