Module: RedBlackTree::LeafNodeComparable

Defined in:
lib/red_black_tree/node/leaf_node_comparable.rb

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/red_black_tree/node/leaf_node_comparable.rb', line 5

def <=> other
  if other.instance_of? ::RedBlackTree::LeafNode
    1
  else
    super
  end
end