module MinDI::InjectableContainer
An InjectableContainer
“injects” itself into the services, so that they can all refer to each other.
Including this module has the combined effect of making the class act as a container (by extend-ing it with Container
) and making the class Injectable
(by include-ing Injectable
). Additionally, including this module defines two class methods injected and uninjected, which determine whether subsequently defined services have the container injected into them. (The default is injected.)
Also, the module defines an inspect method, so that inspecting injected objects doesn’t dump the entire container and all of its services.