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.



62
63
64
65
# File 'lib/cli/ui/color.rb', line 62

def initialize(name)
  super
  @name = name
end

Instance Method Details

#messageObject



68
69
70
71
72
# File 'lib/cli/ui/color.rb', line 68

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