Class: Needle::Lifecycle::Multiton

Class | Needle::Lifecycle::Multiton
In: | lib/needle/lifecycle/multiton.rb
Parent: | Needle::Pipeline::Element

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.

### Methods

call initialize_element reset!

### Public Instance methods

call( container, point, *args )

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.

initialize_element()

Creates the mutex to use and initializes the cache.

reset!()

Resets the caches for this multiton object.

[Validate]