Methods
B
N
R
Constants
RED = :red
 
BLACK = :black
 
COLORS = [RED, BLACK].freeze
 
Attributes
[RW] color
[RW] key
[RW] left
[RW] parent
[RW] right
Class Public methods
new(key, color = RED)
# File benchmark/gc/redblack.rb, line 19
def initialize(key, color = RED)
  raise ArgumentError, "Bad value for color parameter" unless COLORS.include?(color)
  @color = color
  @key = key
  @left = @right = @parent = NilNode.instance
end
Instance Public methods
black?()
# File benchmark/gc/redblack.rb, line 26
def black?
  return color == BLACK
end
red?()
# File benchmark/gc/redblack.rb, line 30
def red?
  return color == RED
end