Exception: Dex::UI::Color::InvalidColorName

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

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ InvalidColorName

Returns a new instance of InvalidColorName.



35
36
37
# File 'lib/dex/ui/color.rb', line 35

def initialize(name)
  @name = name
end

Instance Method Details

#messageObject



39
40
41
42
43
# File 'lib/dex/ui/color.rb', line 39

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