Class: Lista::Node

Inherits:
Struct
  • Object
show all
Defined in:
lib/prct07/lista.rb

Overview

Struct Node. ActĂșa como nodo dentro de la lista Contiene un :value -> Objeto en el nodo,

:next  -> Referencia al siguiente nodo en la lista
:prev  -> Referencia al anterior nodo en la lista

Instance Attribute Summary collapse

Instance Attribute Details

#nextObject

Returns the value of attribute next

Returns:

  • (Object)

    the current value of next



20
21
22
# File 'lib/prct07/lista.rb', line 20

def next
  @next
end

#prevObject

Returns the value of attribute prev

Returns:

  • (Object)

    the current value of prev



20
21
22
# File 'lib/prct07/lista.rb', line 20

def prev
  @prev
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



20
21
22
# File 'lib/prct07/lista.rb', line 20

def value
  @value
end