Class Needle::Lifecycle::Singleton
In: lib/needle/lifecycle/singleton.rb
Parent: Needle::Pipeline::Element

The instantiation pipeline element that enforces the singleton multiplicity.

Methods

Public Instance methods

Returns the cached reference, if it has been previously cached. Otherwise, invokes the next element in the pipeline and caches the result. The cached reference is returned.

Creates the mutex to use and sets the cached reference to nil.

Resets the cached singleton instance, so that the next time it is requested it is re-constructed.

[Validate]