class Databoom::LinkedList
Attributes
head[RW]
Public Class Methods
new()
click to toggle source
# File lib/databoom/linked_list.rb, line 30 def initialize @head = Node.new("*") end
Public Instance Methods
append(value)
click to toggle source
# File lib/databoom/linked_list.rb, line 34 def append(value) @head.append(value) end
append_after(find_node, nodeval)
click to toggle source
# File lib/databoom/linked_list.rb, line 38 def append_after(find_node, nodeval) after_node = find(find_node) return append(nodeval) unless after_node end
find(value)
click to toggle source
# File lib/databoom/linked_list.rb, line 43 def find(value) @head&.find(value) end
inspect()
click to toggle source
# File lib/databoom/linked_list.rb, line 47 def inspect @head&.inspect end