Class: ListNode

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

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



1
2
3
# File 'lib/lander/list_node.rb', line 1

def next
  @next
end

#valObject

Returns the value of attribute val

Returns:

  • (Object)

    the current value of val



1
2
3
# File 'lib/lander/list_node.rb', line 1

def val
  @val
end

Instance Method Details

#to_sObject



2
# File 'lib/lander/list_node.rb', line 2

def to_s; self && "#{val} -> #{self.next}" end