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