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.


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

def initialize(name)
  super
  @name = name
end

Instance Method Details

#messageObject


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

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