Class: Node

Inherits:
Struct
  • Object
show all
Defined in:
lib/food/list.rb

Overview

Esta clase permite representar nodo con un nodo siguiente y un nodo anterior. Se ha incluido el moduulo enumerable

Instance Attribute Summary collapse

Instance Attribute Details

#nextObject

Returns the value of attribute next

Returns:

  • (Object)

    the current value of next



14
15
16
# File 'lib/food/list.rb', line 14

def next
  @next
end

#prevObject

Returns the value of attribute prev

Returns:

  • (Object)

    the current value of prev



14
15
16
# File 'lib/food/list.rb', line 14

def prev
  @prev
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



14
15
16
# File 'lib/food/list.rb', line 14

def value
  @value
end