Module: Injection::ClassInject::ClassMethods
- Defined in:
- lib/injection/class_inject.rb
Instance Method Summary collapse
-
#inject(*keys) ⇒ Object
Specify which components should be injected into this observer as the list of
keys
to look them up from the DI context.
Instance Method Details
#inject(*keys) ⇒ Object
Specify which components should be injected into this observer as the list of keys
to look them up from the DI context.
27 28 29 30 31 32 33 34 35 |
# File 'lib/injection/class_inject.rb', line 27 def inject(*keys) constructor_args = if keys.last.is_a?(Hash) keys[0..-2] + [{:super => []}.merge(keys.last)] else keys + [:super => []] end constructor *constructor_args include Initialize end |