Class: HLH
Instance Attribute Summary
Attributes inherited from Alimento
#glucidos, #indexglucosa, #lipidos, #nombre, #proteinas
Instance Method Summary collapse
-
#initialize(nombre, p, g, l) ⇒ HLH
constructor
A new instance of HLH.
-
#to_s ⇒ Object
Converts the object into a string.
Methods inherited from Alimento
#<=>, #calculate_index, #v_energetico
Constructor Details
#initialize(nombre, p, g, l) ⇒ HLH
Returns a new instance of HLH
72 73 74 |
# File 'lib/nutrientes/alimento.rb', line 72 def initialize(nombre, p, g, l) super(nombre, p, g, l) end |
Instance Method Details
#to_s ⇒ Object
Converts the object into a string
77 78 79 |
# File 'lib/nutrientes/alimento.rb', line 77 def to_s return "Nombre: #{@nombre}, Proteinas: #{@proteinas}gr, Glúcidos: #{@glucidos}gr, Lipidos: #{@lipidos}gr Grupo: Huevos, lácteos y helados" end |