Class: Grupoal
Instance Attribute Summary
Attributes inherited from Alimento
Instance Method Summary collapse
-
#initialize(grupo, nombre, prt, gluc, lip) ⇒ Grupoal
constructor
A new instance of Grupoal.
- #to_s ⇒ Object
Methods inherited from Alimento
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_s ⇒ Object
31 32 33 |
# File 'lib/alimento/alimento.rb', line 31 def to_s puts @grupo+"\n\t"+super.to_s end |