Project page: http://rubyforge.org/projects/needle
User Manual: http://needle.rubyforge.org
API Docs: http://needle.rubyforge.org/api
FAQ Document: http://needle.rubyforge.org/faq.html
Needle Wiki: http://needle.rubyforge.org/wiki/wiki.pl
1.2引入了一些新的特点,修正了一些错误:
* Parameterized services. You can now specify parameters when
requesting a service, and (unless the service model in use is
incompatible with extra parameters, like singleton) those parameters
will be passed to the constructor block of the service. This allows, for
example:
* Multiton services. You can use a multiton service model when
registering a service, and then every unique set of parameters used when
requesting a service will result in the caching of the returned object,
to be reused whenever the same parameter set is given.
* :log_for is a new parameterized service that provides more
convenient access to a registry's log factory. Just pass the name of the
log you want (or the service point to obtain a log for) to the :log_for
service when requesting it:
log1 = c.log_for( "foo" )
log2 = c.log_for( point )
* DefinitionContext now passes all unknown messages through to its
container, making it possible to access parameterized services via the
definition context.
* Updated the manual and FAQ documents to include the new features
described above.
* Fixed several bugs and documentation typos.