Class: Node

Inherits:
Struct
  • Object
show all
Defined in:
lib/node/node.rb,
lib/node/node.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (Object) father

Returns the value of attribute father

Returns:

  • (Object)

    the current value of father



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

def father
  @father
end

- (Object) next

Returns the value of attribute next

Returns:

  • (Object)

    the current value of next



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

def next
  @next
end

- (Object) value

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



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

def value
  @value
end

Instance Method Details

- (Object) reverse {|_self| ... }

Yields:

  • (_self)

Yield Parameters:

  • _self (Node)

    the object that the method was called on



3
4
5
6
7
8
# File 'lib/node/node.rb', line 3

def reverse(&block)
	if self.next != nil
		self.next.reverse(&block)
	end
	yield self
end