Class: GrupoEdad
- Inherits:
-
DoubleList
- Object
- Lista
- DoubleList
- GrupoEdad
- Defined in:
- lib/menu/GrupoEdad.rb
Instance Attribute Summary collapse
-
#tipo ⇒ Object
Returns the value of attribute tipo.
Attributes inherited from DoubleList
Attributes inherited from Lista
Instance Method Summary collapse
-
#initialize(nodo, tipo) ⇒ GrupoEdad
constructor
A new instance of GrupoEdad.
- #to_s ⇒ Object
Methods inherited from DoubleList
Methods inherited from Lista
Constructor Details
#initialize(nodo, tipo) ⇒ GrupoEdad
Returns a new instance of GrupoEdad.
4 5 6 7 8 9 10 |
# File 'lib/menu/GrupoEdad.rb', line 4 def initialize(nodo, tipo) @head = nodo @size = 1 @tail = nodo @head.prev = nil @tipo = tipo end |
Instance Attribute Details
#tipo ⇒ Object
Returns the value of attribute tipo.
3 4 5 |
# File 'lib/menu/GrupoEdad.rb', line 3 def tipo @tipo end |
Instance Method Details
#to_s ⇒ Object
11 12 13 14 15 |
# File 'lib/menu/GrupoEdad.rb', line 11 def to_s s = "" s << "#{@tipo}\n" s << super.to_s end |