Class: List::Node

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

Overview

This structure is used to represent Nodes in the List, which have a value, a next node and a previous node

Instance Attribute Summary collapse

Instance Attribute Details

#nextObject

Returns the value of attribute next

Returns:

  • (Object)

    the current value of next



10
11
12
# File 'lib/list.rb', line 10

def next
  @next
end

#prevObject

Returns the value of attribute prev

Returns:

  • (Object)

    the current value of prev



10
11
12
# File 'lib/list.rb', line 10

def prev
  @prev
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



10
11
12
# File 'lib/list.rb', line 10

def value
  @value
end