Class: ListaHija
Overview
Clase que hereda de la Lista doble y sobre escribe el metodo each, ya que se comporta ligeramente diferente al original
Instance Attribute Summary
Attributes inherited from Lista
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize ⇒ ListaHija
constructor
A new instance of ListaHija.
Methods inherited from Lista
#extraerPrimerElemento, #extraerUltimoElemento, #insertar_final, #insertar_inicio, #mostar_fin_inicio, #mostar_inicio_fin
Constructor Details
#initialize ⇒ ListaHija
Returns a new instance of ListaHija.
3 4 5 |
# File 'lib/referencia/listahija.rb', line 3 def initialize super end |
Instance Method Details
#each ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/referencia/listahija.rb', line 6 def each aux =self.inicio while aux != nil do yield aux.value.to_s aux = aux.next end end |