Class: List
- Inherits:
-
Object
- Object
- List
- Defined in:
- lib/biblio/list.rb
Instance Method Summary collapse
- #elemento ⇒ Object
- #extraer_elemento ⇒ Object
-
#initialize ⇒ List
constructor
A new instance of List.
- #insertar_elemento(node) ⇒ Object
Constructor Details
Instance Method Details
#elemento ⇒ Object
12 13 14 15 |
# File 'lib/biblio/list.rb', line 12 def elemento @elemento end |
#extraer_elemento ⇒ Object
26 27 28 29 30 31 |
# File 'lib/biblio/list.rb', line 26 def extraer_elemento aux = @elemento @elemento = @elemento.next aux.value end |
#insertar_elemento(node) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/biblio/list.rb', line 17 def insertar_elemento(node) if @elemento != nil node.next = @elemento @elemento = node end end |