class DoublyLinkedlist::Node

Creates a node with value and links to next/previous nodes.

Attributes

next[RW]

@return [Node] the next/previous node object.

prev[RW]

@return [Node] the next/previous node object.

value[R]

@return [Object] the node value.

Public Class Methods

new(value) click to toggle source

Initializes a node with the given object as its value.

@param value [Object] the value to be set as node value.

# File lib/doubly_linkedlist/node.rb, line 15
def initialize(value)
  @value = value
end