Exception: MediaTypes::Scheme::SymbolOverwritingStringError

Inherits:
DuplicateKeyError
  • Object
show all
Defined in:
lib/media_types/scheme/errors.rb

Constant Summary collapse

MESSAGE_TEMPLATE =
'Trying to add %<rule_type>s rule with Symbol key :%<key>s while a String key with the same name already exists. Please remove one of the two.'

Instance Method Summary collapse

Constructor Details

#initialize(rule_type, key) ⇒ SymbolOverwritingStringError

Returns a new instance of SymbolOverwritingStringError.



43
44
45
# File 'lib/media_types/scheme/errors.rb', line 43

def initialize(rule_type, key)
  super(format(MESSAGE_TEMPLATE, { rule_type: rule_type, key: key }))
end