app/volt/tasks/channel_tasks.rb in volt-0.4.9 vs app/volt/tasks/channel_tasks.rb in volt-0.4.10
- old
+ new
@@ -5,21 +5,21 @@
# The dispatcher passes its self in
def initialize(channel, dispatcher=nil)
@channel = channel
end
- def add_listener(channel_name)
+ def add_listener(channel_name, scope={})
# Track every channel that is listening
@@listeners[channel_name] ||= []
@@listeners[channel_name] << @channel
# Also keep track of which channel names a channel is listening
# on so it can be removed if a channel is closed.
@@channel_listeners[@channel] ||= {}
@@channel_listeners[@channel][channel_name] = true
end
- def remove_listener(channel_name)
+ def remove_listener(channel_name, scope={})
if @@listeners[channel_name]
@@listeners[channel_name].delete(@channel)
if @@channel_listeners[@channel]
@@channel_listeners[@channel].delete(channel_name)
end
\ No newline at end of file