method
add_subscriber
v5.2.3 -
Show latest stable
- Class:
ActionCable::SubscriptionAdapter::SubscriberMap
add_subscriber(channel, subscriber, on_success)public
No documentation available.
# File actioncable/lib/action_cable/subscription_adapter/subscriber_map.rb, line 11
def add_subscriber(channel, subscriber, on_success)
@sync.synchronize do
new_channel = [email protected]?(channel)
@subscribers[channel] << subscriber
if new_channel
add_channel channel, on_success
elsif on_success
on_success.call
end
end
end