class Lista
Attributes
inicio[R]
Public Class Methods
new()
click to toggle source
# File lib/Bib/Lista.rb, line 7 def initialize() @inicio = Nodo.new(nil) end
Public Instance Methods
extract()
click to toggle source
# File lib/Bib/Lista.rb, line 19 def extract() #pop if (@inicio != nil) @aux=Nodo.new(nil) aux = @inicio @inicio = @inicio.next return aux.value end end
insert(nodo)
click to toggle source
# File lib/Bib/Lista.rb, line 11 def insert(nodo) #push if (@inicio != nil) nodo.next = @inicio @inicio = nodo end true end