Class: BiNode

Inherits:
Object
  • Object
show all
Defined in:
lib/bi-dimensional-node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x, y, *args) ⇒ BiNode

Create the tree’s root with the base values x and y and an unkown number of arguments.



7
8
9
10
11
# File 'lib/bi-dimensional-node.rb', line 7

def initialize(x, y, *args)
  @x    = x
  @y    = y
  @args = args
end

Instance Attribute Details

#argsObject

Returns the value of attribute args.



3
4
5
# File 'lib/bi-dimensional-node.rb', line 3

def args
  @args
end

#eastObject

Returns the value of attribute east.



3
4
5
# File 'lib/bi-dimensional-node.rb', line 3

def east
  @east
end

#northObject

Returns the value of attribute north.



3
4
5
# File 'lib/bi-dimensional-node.rb', line 3

def north
  @north
end

#southObject

Returns the value of attribute south.



3
4
5
# File 'lib/bi-dimensional-node.rb', line 3

def south
  @south
end

#westObject

Returns the value of attribute west.



3
4
5
# File 'lib/bi-dimensional-node.rb', line 3

def west
  @west
end

#xObject (readonly)

Returns the value of attribute x.



2
3
4
# File 'lib/bi-dimensional-node.rb', line 2

def x
  @x
end

#yObject (readonly)

Returns the value of attribute y.



2
3
4
# File 'lib/bi-dimensional-node.rb', line 2

def y
  @y
end