Exception: Kiba::Extend::Registry::FileRegistry::KeyNotRegisteredError

Inherits:
NameError
  • Object
show all
Includes:
ErrMod
Defined in:
lib/kiba/extend/registry/file_registry.rb

Overview

Exception raised if the file key is not registered

Since:

  • 2.2.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ErrMod

#calling_job, #info

Constructor Details

#initialize(key, type = nil) ⇒ KeyNotRegisteredError

Returns a new instance of KeyNotRegisteredError.

Parameters:

  • key (Symbol)
  • type (Symbol<:destination, :source, :lookup>) (defaults to: nil)

Since:

  • 2.2.0



33
34
35
36
37
38
39
# File 'lib/kiba/extend/registry/file_registry.rb', line 33

def initialize(key, type = nil)
  @key = key
  @type = type
  keymsg = "No file registered under the key: :#{key}"
  typemsg = type ? "#{keymsg} (as #{type})" : keymsg
  super(typemsg)
end

Instance Attribute Details

#keyObject (readonly)

Since:

  • 2.2.0



30
31
32
# File 'lib/kiba/extend/registry/file_registry.rb', line 30

def key
  @key
end

#typeObject (readonly)

Since:

  • 2.2.0



30
31
32
# File 'lib/kiba/extend/registry/file_registry.rb', line 30

def type
  @type
end