Class: Sickill::Rainbow::AnsiColor
- Inherits:
-
Object
- Object
- Sickill::Rainbow::AnsiColor
- Defined in:
- lib/glark/util/highlight.rb
Instance Method Summary collapse
-
#validate_color_name ⇒ Object
includes the aberrant color name in the error message.
Instance Method Details
#validate_color_name ⇒ Object
includes the aberrant color name in the error message.
21 22 23 24 25 26 27 |
# File 'lib/glark/util/highlight.rb', line 21 def validate_color_name #:nodoc: color_names = TERM_COLORS.keys unless color_names.include?(@color) raise ArgumentError.new "Unknown color name: '#{@color}'; valid names: #{color_names.join(', ')}" end end |