Exception: MediaTypes::Scheme::DuplicateStringKeyError

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) ⇒ DuplicateStringKeyError

Returns a new instance of DuplicateStringKeyError.



27
28
29
# File 'lib/media_types/scheme/errors.rb', line 27

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