Exception: Kiba::Extend::Registry::FileRegistry::KeyNotRegisteredError
- Inherits:
-
NameError
- Object
- NameError
- Kiba::Extend::Registry::FileRegistry::KeyNotRegisteredError
- Includes:
- ErrMod
- Defined in:
- lib/kiba/extend/registry/file_registry.rb
Overview
Exception raised if the file key is not registered
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
-
#type ⇒ Object
readonly
Instance Method Summary collapse
-
#initialize(key, type = nil) ⇒ KeyNotRegisteredError
constructor
A new instance of KeyNotRegisteredError.
Methods included from ErrMod
Constructor Details
#initialize(key, type = nil) ⇒ KeyNotRegisteredError
Returns a new instance of KeyNotRegisteredError.
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
#key ⇒ Object (readonly)
30 31 32 |
# File 'lib/kiba/extend/registry/file_registry.rb', line 30 def key @key end |
#type ⇒ Object (readonly)
30 31 32 |
# File 'lib/kiba/extend/registry/file_registry.rb', line 30 def type @type end |