Module: MinDI::InjectableContainer::ClassMethods

Defined in:
lib/mindi.rb

Overview

These methods are available in the scope of your class definition, after you have included MinDI::InjectableContainer.

Instance Method Summary collapse

Instance Method Details

#injectedObject

Set state so subsequently defined services have the container injected into them when they are instantiated. (This is the default state.)



362
363
364
# File 'lib/mindi.rb', line 362

def injected
  @__services_are_injected__ = true
end

#uninjectedObject

Set state so subsequently defined services do not have the container injected into them when they are instantiated.



368
369
370
# File 'lib/mindi.rb', line 368

def uninjected
  @__services_are_injected__ = false
end