Exception: Injectable::Registry::NotRegistered

Inherits:
Exception
  • Object
show all
Defined in:
lib/injectable/registry.rb

Overview

This error is raised when asking for an implementing class that is not registered in the registry.

Since:

  • 0.0.2

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ NotRegistered

Initialize the new error.

Examples:

Initialize the error.

NotRegistered.new(:persistable)

Parameters:

  • name (Symbol)

    The name of the implementation.

Since:

  • 0.0.2



77
78
79
80
# File 'lib/injectable/registry.rb', line 77

def initialize(name)
  @name = name
  super("No implementation registered for name: #{name.inspect}.")
end

Instance Attribute Details

#nameObject (readonly)

Since:

  • 0.0.2



67
68
69
# File 'lib/injectable/registry.rb', line 67

def name
  @name
end

#name The name of the requested implementation.(Thenameoftherequestedimplementation.) ⇒ Object (readonly)



67
# File 'lib/injectable/registry.rb', line 67

attr_reader :name