Class: AlimentosRenC
Instance Attribute Summary
Attributes inherited from Alimento
#glucidos, #indexglucosa, #lipidos, #nombre, #proteinas
Instance Method Summary collapse
-
#initialize(nombre, p, g, l) ⇒ AlimentosRenC
constructor
A new instance of AlimentosRenC.
-
#to_s ⇒ Object
Converts the object into a string.
Methods inherited from Alimento
#<=>, #calculate_index, #v_energetico
Constructor Details
#initialize(nombre, p, g, l) ⇒ AlimentosRenC
Returns a new instance of AlimentosRenC
116 117 118 |
# File 'lib/nutrientes/alimento.rb', line 116 def initialize(nombre, p, g, l) super(nombre, p, g, l) end |
Instance Method Details
#to_s ⇒ Object
Converts the object into a string
121 122 123 |
# File 'lib/nutrientes/alimento.rb', line 121 def to_s return "Nombre: #{@nombre}, Proteinas: #{@proteinas}gr, GlĂșcidos: #{@glucidos}gr, Lipidos: #{@lipidos}gr Grupo: Alimentos ricos en carbohidratos" end |