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.
34 35 36 |
# File 'lib/poniard/injector.rb', line 34 def initialize(name) @name = name end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
38 39 40 41 |
# File 'lib/poniard/injector.rb', line 38 def method_missing(*args) ::Kernel.raise UnknownParam, "Tried to call method on an uninjected param: #{@name}" end |