Class: Alimento::Bebidas
Instance Attribute Summary collapse
-
#grupo ⇒ Object
readonly
Esta clase permite representar alimentos dentro del grupo “Bebidas”.
Attributes inherited from Alimento
#glucidos, #lipidos, #nombre, #proteinas
Instance Method Summary collapse
-
#initialize(nombre, proteinas, glucidos, lipidos) ⇒ Bebidas
constructor
A new instance of Bebidas.
Methods inherited from Alimento
#<=>, #==, #aibc, #ind_glu, #to_s, #val_energ
Constructor Details
#initialize(nombre, proteinas, glucidos, lipidos) ⇒ Bebidas
Returns a new instance of Bebidas.
207 208 209 210 |
# File 'lib/alimento/fuente.rb', line 207 def initialize(nombre, proteinas, glucidos, lipidos) super(nombre, proteinas, glucidos, lipidos) @grupo = "Bebidas" end |
Instance Attribute Details
#grupo ⇒ Object (readonly)
Esta clase permite representar alimentos dentro del grupo “Bebidas”. Hereda de la clase alimento.
205 206 207 |
# File 'lib/alimento/fuente.rb', line 205 def grupo @grupo end |