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

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

Instance Method Summary collapse

Methods included from T::Sig

sig

Constructor Details

#initialize(name) ⇒ InvalidColorName

Returns a new instance of InvalidColorName.



65
66
67
68
# File 'lib/cli/ui/color.rb', line 65

def initialize(name)
  super
  @name = name
end

Instance Method Details

#messageObject



71
72
73
74
75
# File 'lib/cli/ui/color.rb', line 71

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