class MinitestBender::Colorizer

Constants

COLORS
SAFE_COLORS

In compatibility modes, colors that are mapped to black are avoided.

Private Class Methods

color_keys() click to toggle source
# File lib/minitest-bender/colorizer.rb, line 46
def color_keys
  COLORS.keys
end
colorize(string, color, *args) click to toggle source
# File lib/minitest-bender/colorizer.rb, line 37
def colorize(string, color, *args)
  if color == :normal
    Paint[string, *args]
  else
    color_value = colors.fetch(color)
    Paint[string, color_value, *args]
  end
end
colors() click to toggle source
# File lib/minitest-bender/colorizer.rb, line 52
def colors
  @colors ||= COLORS.merge(custom_colors)
end
custom_colors() click to toggle source
# File lib/minitest-bender/colorizer.rb, line 56
def custom_colors
  @custom_colors || {}
end
custom_colors=(custom_colors) click to toggle source
# File lib/minitest-bender/colorizer.rb, line 33
def custom_colors=(custom_colors)
  @custom_colors = custom_colors
end