[ANN] Needle 1.2.0发布


   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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值