The instantiation pipeline element that enforces the multiton multiplicity. "Multiton" multiplicity is like singleton multiplicity, except that the guarded instance is unique for each unique set of arguments passed to the multiton.
Returns the cached reference for the given arguments, 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/multiton.rb, line 40 def call( container, point, *args ) unless @is_cached[ args ] @mutex.synchronize do unless @is_cached[ args ] @cached[ args ] = succ.call( container, point, *args ) @is_cached[ args ] = true end end end @cached[ args ] end
Generated with the Darkfish Rdoc Generator 2.