Class: Grupoal

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

Instance Attribute Summary

Attributes inherited from Alimento

#gluc, #lip, #nombre, #prt

Instance Method Summary collapse

Methods inherited from Alimento

#<=>, #kcal

Constructor Details

#initialize(grupo, nombre, prt, gluc, lip) ⇒ Grupoal

Returns a new instance of Grupoal.



27
28
29
30
# File 'lib/alimento/alimento.rb', line 27

def initialize(grupo,nombre,prt,gluc,lip)
        super(nombre,prt,gluc,lip)
        @grupo=grupo
end

Instance Method Details

#to_sObject



31
32
33
# File 'lib/alimento/alimento.rb', line 31

def to_s
        puts @grupo+"\n\t"+super.to_s
end