Exception: AocCli::Errors::KeyDup

Inherits:
StandardError
  • Object
show all
Defined in:
lib/aoc_cli/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ KeyDup

Returns a new instance of KeyDup.



121
122
123
# File 'lib/aoc_cli/errors.rb', line 121

def initialize(key)
	@key = key
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



120
121
122
# File 'lib/aoc_cli/errors.rb', line 120

def key
  @key
end

Instance Method Details

#messageObject



124
125
126
127
128
# File 'lib/aoc_cli/errors.rb', line 124

def message
	<<~error
	#{ERROR}: The key #{key.yellow} already exists in your config file
	error
end