blob: 4a2a8d23a2845c1d61251981f151910734471e7f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
module ActionCable
module SubscriptionAdapter
class Inline < Base # :nodoc:
def broadcast(channel, payload)
subscriber_map.broadcast(channel, payload)
end
def subscribe(channel, callback, success_callback = nil)
subscriber_map.add_subscriber(channel, callback, success_callback)
end
def unsubscribe(channel, callback)
subscriber_map.remove_subscriber(channel, callback)
end
def shutdown
# nothing to do
end
private
def subscriber_map
@subscriber_map ||= SubscriberMap.new
end
end
end
end
|