Class: Alimento::Bebidas

Inherits:
Alimento show all
Defined in:
lib/alimento/fuente.rb

Instance Attribute Summary collapse

Attributes inherited from Alimento

#glucidos, #lipidos, #nombre, #proteinas

Instance Method Summary collapse

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

#grupoObject (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