Class: HLH

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

Instance Attribute Summary

Attributes inherited from Alimento

#glucidos, #indexglucosa, #lipidos, #nombre, #proteinas

Instance Method Summary collapse

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_sObject

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