Class: Dieta::Edad
Instance Attribute Summary collapse
-
#rango_edad ⇒ Object
Returns the value of attribute rango_edad.
Attributes inherited from Dieta
Instance Method Summary collapse
-
#initialize(a, b, c, d) ⇒ Edad
constructor
A new instance of Edad.
- #rango ⇒ Object
- #to_s ⇒ Object
Methods inherited from Dieta
#<=>, #get_footer, #get_plato, #get_platos, #get_porc_gras, #get_porc_hdc, #get_porc_inges_diaria, #get_porc_prot, #get_titulo, #get_vct
Constructor Details
#initialize(a, b, c, d) ⇒ Edad
Returns a new instance of Edad
125 126 127 |
# File 'lib/practica8/dieta.rb', line 125 def initialize(a,b,c,d) @cabecera, @descrip, @vct, @rango_edad = a, b, c, d end |
Instance Attribute Details
#rango_edad ⇒ Object
Returns the value of attribute rango_edad
123 124 125 |
# File 'lib/practica8/dieta.rb', line 123 def rango_edad @rango_edad end |
Instance Method Details
#rango ⇒ Object
129 130 131 132 |
# File 'lib/practica8/dieta.rb', line 129 def rango() out = "\nIntervalos de edad: #{@rango_edad}" out end |
#to_s ⇒ Object
134 135 136 137 138 |
# File 'lib/practica8/dieta.rb', line 134 def to_s out = super.to_s out << rango() out end |