Exception: MediaTypes::Scheme::DuplicateSymbolKeyError

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

Constant Summary collapse

MESSAGE_TEMPLATE =
'%<rule_type>s rule with key :%<key>s has already been defined. Please remove one of the two.'

Instance Method Summary collapse

Constructor Details

#initialize(rule_type, key) ⇒ DuplicateSymbolKeyError

Returns a new instance of DuplicateSymbolKeyError.



19
20
21
# File 'lib/media_types/scheme/errors.rb', line 19

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