Module: Needle::Extras::AttrInject
- Defined in:
- lib/needle/extras/attr-inject.rb
Defined Under Namespace
Classes: InjectorElement
Class Method Summary collapse
-
.register_services(container) ⇒ Object
Registers the InjectorElement pipeline element, and adds some new service models (multiton_inject, prototype_inject, and singleton_inject).
Class Method Details
.register_services(container) ⇒ Object
Registers the InjectorElement pipeline element, and adds some new service models (multiton_inject, prototype_inject, and singleton_inject).
61 62 63 64 65 66 67 68 |
# File 'lib/needle/extras/attr-inject.rb', line 61 def register_services( container ) container.pipeline_elements[ :attr_inject ] = InjectorElement container.service_models.update( :multiton_inject => [ :multiton, :attr_inject ], :prototype_inject => [ :attr_injector ], :singleton_inject => [ :singleton, :attr_inject ] ) end |