Class: AVLTree::Node
- Inherits:
-
Object
- Object
- AVLTree::Node
- Defined in:
- lib/ruby-avl/node.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#left ⇒ Object
Returns the value of attribute left.
-
#right ⇒ Object
Returns the value of attribute right.
Instance Method Summary collapse
-
#initialize(data) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(data) ⇒ Node
Returns a new instance of Node.
5 6 7 8 9 |
# File 'lib/ruby-avl/node.rb', line 5 def initialize(data) @data = data @left = nil @right = nil end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
3 4 5 |
# File 'lib/ruby-avl/node.rb', line 3 def data @data end |
#left ⇒ Object
Returns the value of attribute left.
3 4 5 |
# File 'lib/ruby-avl/node.rb', line 3 def left @left end |
#right ⇒ Object
Returns the value of attribute right.
3 4 5 |
# File 'lib/ruby-avl/node.rb', line 3 def right @right end |