The instantiation pipeline element that enforces the singleton multiplicity.
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.
# File lib/needle/lifecycle/singleton.rb, line 38 def call( container, point ) unless @is_cached @mutex.synchronize do unless @is_cached @cached = succ.call( container, point ) @is_cached = true end end end @cached end
Generated with the Darkfish Rdoc Generator 2.