Class: ActionCable::SubscriptionAdapter::Inline
- Defined in:
- actioncable/lib/action_cable/subscription_adapter/inline.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #broadcast(channel, payload) ⇒ Object
-
#initialize ⇒ Inline
constructor
A new instance of Inline.
- #shutdown ⇒ Object
- #subscribe(channel, callback, success_callback = nil) ⇒ Object
- #unsubscribe(channel, callback) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize ⇒ Inline
Returns a new instance of Inline.
6 7 8 9 |
# File 'actioncable/lib/action_cable/subscription_adapter/inline.rb', line 6 def initialize(*) super @subscriber_map = nil end |
Instance Method Details
#broadcast(channel, payload) ⇒ Object
11 12 13 |
# File 'actioncable/lib/action_cable/subscription_adapter/inline.rb', line 11 def broadcast(channel, payload) subscriber_map.broadcast(channel, payload) end |
#shutdown ⇒ Object
23 24 25 |
# File 'actioncable/lib/action_cable/subscription_adapter/inline.rb', line 23 def shutdown # nothing to do end |
#subscribe(channel, callback, success_callback = nil) ⇒ Object
15 16 17 |
# File 'actioncable/lib/action_cable/subscription_adapter/inline.rb', line 15 def subscribe(channel, callback, success_callback = nil) subscriber_map.add_subscriber(channel, callback, success_callback) end |
#unsubscribe(channel, callback) ⇒ Object
19 20 21 |
# File 'actioncable/lib/action_cable/subscription_adapter/inline.rb', line 19 def unsubscribe(channel, callback) subscriber_map.remove_subscriber(channel, callback) end |