class RubyStructures::Node

Attributes

list[R]
next[RW]
value[RW]

Public Class Methods

new(list, value) click to toggle source

Internal: Creates a new instance of Node.

list - instance of LinkedList to which the Node belongs. value - the value to be stored in the Node.

Examples

@node = RubyStructures::Node.new

Returns a new instance of Node.

# File lib/rubystructures/node.rb, line 17
def initialize(list, value)
        @list = list
        @value = value
end