1. Introduction
1.1. What is Needle-Extras?
Needle-Extras is a collection of additional services and utilities that can be used in conjuction with Needle. It is a kind of test-bed for services that may eventually find their way into Needle itself.
Currently, Needle-Extras includes the following services and utilities:
- AttrInject: this is an implementation of simple interface-based dependency injection, inspired by a proof-of-concept by Christian Neukirchen (http://rafb.net/paste/results/sexpfu84.html).
- Multicast: this is a demonstration of how to do multicast services—services that delegate the messages they receive to a collection of other services.
- RequireLibrary: this is not actually a service, so much as a mini-framework for simplifying the process of including a third-party service in your application.
1.2. How Do I Use It?
You can make all of the services in Needle-Extras available to your applications in either of two ways.
The first way uses the standard Collection#require
method to load a service library and include it in a container:
require 'needle' reg = Needle::Registry.new reg.require 'needle/extras', 'Needle::Extras' ...
The second way uses the RequireLibrary framework provided by Needle-Extras itself:
require 'needle' require 'needle/extras' reg = Needle::Registry.new reg.require_library 'needle/extras'
If you don’t want to use all of the services available in Needle-Extras, you can include just the ones you want by requiring them directly:
require 'needle' reg = Needle::Registry.new reg.require 'needle/extras/multicast', 'Needle::Extras::Multicast'
1.3. License Information
Needle-Extras is made available under either the BSD license, or the same license Ruby (which, by extension, also allows the GPL as a permissable license as well). You can view the full text of any of these licenses in the doc
subdirectory of the Needle distrubtion. The texts of the BSD and GPL licenses are also available online: BSD and GPL.
This manual (in any form, be it source or otherwise) and the scripts and templates used to generate it, are all distributed under the Creative Commons Attribution-ShareAlike license.
If you desire permission to use either Needle-Extras or the manual in a manner incompatible with these licenses, please contact the copyright holder (Jamis Buck) in order to negotiate a more compatible license.
1.4. Support
Mailing lists, bug trackers, feature requests, and public forums are available (courtesy of RubyForge) at Needle’s RubyForge project page. Just direct your browser to http://rubyforge.org/projects/needle.