Class: Node

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

Overview

(tail) O (:next)-> O -> O ->(:prev) O (head)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nextObject

Returns the value of attribute next

Returns:

  • (Object)

    the current value of next



4
5
6
# File 'lib/dietaryMenu/dll.rb', line 4

def next
  @next
end

#prevObject

Returns the value of attribute prev

Returns:

  • (Object)

    the current value of prev



4
5
6
# File 'lib/dietaryMenu/dll.rb', line 4

def prev
  @prev
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



4
5
6
# File 'lib/dietaryMenu/dll.rb', line 4

def value
  @value
end

Instance Method Details

#to_sObject



5
6
7
# File 'lib/dietaryMenu/dll.rb', line 5

def to_s
    value.to_s
end