Class: Alimento::Grupoal

Inherits:
Alimento show all
Defined in:
lib/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.



34
35
36
37
# File 'lib/alimento.rb', line 34

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

Instance Method Details

#to_sObject



38
39
40
# File 'lib/alimento.rb', line 38

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