Module: Needle::Extras::Multicast

Defined in:
lib/needle/extras/multicast.rb

Defined Under Namespace

Classes: Target

Class Method Summary collapse

Class Method Details

.register_services(container) ⇒ Object

Register the multicast factory service in the given container. The multicast service is a parameterized service which accepts a single parameter–an array of the targets to apply to the multicaster. It will then return an instance of a multicast service.



32
33
34
35
36
# File 'lib/needle/extras/multicast.rb', line 32

def register_services( container )
  container.define.multicast :model => :prototype do |c,p,*targets|
    Multicast::Target.new( *targets )
  end
end