Exception: CLI::UI::Color::InvalidColorName

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/cli/ui/color.rb

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ InvalidColorName

Returns a new instance of InvalidColorName.


50
51
52
53
# File 'lib/cli/ui/color.rb', line 50

def initialize(name)
  super
  @name = name
end

Instance Method Details

#messageObject


55
56
57
58
59
# File 'lib/cli/ui/color.rb', line 55

def message
  keys = Color.available.map(&:inspect).join(',')
  "invalid color: #{@name.inspect} " \
    "-- must be one of CLI::UI::Color.available (#{keys})"
end