Class: RedBlackTree::LeafNode
- Defined in:
- lib/red_black_tree/node/leaf_node.rb
Constant Summary
Constants included from Node::Implementation
Node::Implementation::BLACK, Node::Implementation::COLOURS, Node::Implementation::DIRECTIONS, Node::Implementation::LEFT, Node::Implementation::RED, Node::Implementation::RIGHT
Instance Attribute Summary
Attributes inherited from Node
Attributes included from Node::Implementation
#colour, #data, #left, #parent, #right, #tree
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize ⇒ LeafNode
constructor
A new instance of LeafNode.
Methods inherited from Node
Methods included from Node::Implementation
#black!, #black?, #children, #children_are_leaves?, #children_are_valid?, #close_nephew, #distant_nephew, #leaf?, #opposite_position, #position, #red!, #red?, #sibling, #single_child_is_leaf?, #swap_colour_with!, #swap_position_with!, #valid?, #validate!, #validate_free!
Methods included from Node::LeftRightElementReferencers
Methods included from DataDelegation
#method_missing, #respond_to_missing?
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RedBlackTree::DataDelegation
Instance Method Details
#<=>(other) ⇒ Object
13 14 15 |
# File 'lib/red_black_tree/node/leaf_node.rb', line 13 def <=> other (other.instance_of? LeafNode) ? 0 : -1 end |