This is a default queue implementation that ships with Notifications. It just pushes events to all registered log subscribers.
# File lib/active_support/notifications/fanout.rb, line 28
28: def listeners_for(name)
29: @listeners_for[name] ||= @subscribers.select { |s| s.subscribed_to?(name) }
30: end
# File lib/active_support/notifications/fanout.rb, line 32
32: def listening?(name)
33: listeners_for(name).any?
34: end
# File lib/active_support/notifications/fanout.rb, line 24
24: def publish(name, *args)
25: listeners_for(name).each { |s| s.publish(name, *args) }
26: end
# File lib/active_support/notifications/fanout.rb, line 11
11: def subscribe(pattern = nil, block = Proc.new)
12: subscriber = Subscriber.new(pattern, block).tap do |s|
13: @subscribers << s
14: end
15: @listeners_for.clear
16: subscriber
17: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.