Class: Alimento_IG

Inherits:
Alimentos show all
Includes:
Enumerable
Defined in:
lib/Alimento/alimento.rb

Instance Method Summary collapse

Methods inherited from Alimentos

#<=>, #glucidos_to_i, #informacion_to_s, #lipidos_to_i, #nombre_to_s, #proteinas_to_i, #valor_energetico

Constructor Details

#initialize(nom, pro, glu, lip, valores) ⇒ Alimento_IG

Inicializa los valores



68
69
70
71
# File 'lib/Alimento/alimento.rb', line 68

def initialize(nom, pro, glu, lip, valores)
    super(nom, pro, glu, lip)
    @ign = valores
end

Instance Method Details

#each {|| ... } ⇒ Object

Yields:

  • ()


73
74
75
76
# File 'lib/Alimento/alimento.rb', line 73

def each
  yield @ign[0]
  yield @ign[1]
end