Class: Poniard::UnknownInjectable
- Inherits:
- BasicObject
- Defined in:
- lib/poniard/injector.rb
Instance Method Summary collapse
-
#initialize(name) ⇒ UnknownInjectable
constructor
A new instance of UnknownInjectable.
- #method_missing(*args) ⇒ Object
Constructor Details
#initialize(name) ⇒ UnknownInjectable
Returns a new instance of UnknownInjectable.
46 47 48 |
# File 'lib/poniard/injector.rb', line 46 def initialize(name) @name = name end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
50 51 52 53 |
# File 'lib/poniard/injector.rb', line 50 def method_missing(*args) ::Kernel.raise UnknownParam, "Tried to call method on an uninjected param: #{@name}" end |