Class: MenuAge
Instance Attribute Summary collapse
Attributes inherited from Diet
#dip, #pchdt, #pfts, #pprtn, #rcps, #ttl, #vct
Instance Method Summary collapse
-
#initialize(age, ttl, dip, vct, pprtn, pfts, pchdt) ⇒ MenuAge
constructor
A new instance of MenuAge.
-
#to_s ⇒ String
String con el contenido de la lista.
Methods inherited from Diet
Constructor Details
#initialize(age, ttl, dip, vct, pprtn, pfts, pchdt) ⇒ MenuAge
Returns a new instance of MenuAge
23 24 25 26 27 28 29 |
# File 'lib/prct06/menuAge.rb', line 23 def initialize(age, ttl, dip, vct, pprtn, pfts, pchdt) @age = age super(ttl, dip, vct, pprtn, pfts, pchdt) end |
Instance Attribute Details
#M ⇒ Object
16 17 18 |
# File 'lib/prct06/menuAge.rb', line 16 def age @age end |
Instance Method Details
#to_s ⇒ String
Returns String con el contenido de la lista
34 35 36 37 38 39 40 |
# File 'lib/prct06/menuAge.rb', line 34 def to_s() tmp = super.to_s + "Edad: #{@age}\n" tmp end |