Exception: Dry::Plugins::Registry::KeyError

Inherits:
Error
  • Object
show all
Defined in:
lib/dry/plugins/registry/key_error.rb

Overview

Plug-in registration error

Instance Method Summary collapse

Constructor Details

#initialize(registry, key, plugin) ⇒ KeyError

Returns a new instance of KeyError.



10
11
12
13
14
15
16
17
18
# File 'lib/dry/plugins/registry/key_error.rb', line 10

def initialize(registry, key, plugin)
  super <<~ERROR
    Cannot register #{key.inspect} in #{registry.inspect}
      as
        #{indent plugin.inspect}
      since previously registered
        #{indent registry[key].inspect}
  ERROR
end