Module: ActionCable::Channel::Callbacks::ClassMethods
- Defined in:
- actioncable/lib/action_cable/channel/callbacks.rb
Instance Method Summary collapse
- #after_subscribe(*methods, &block) ⇒ Object (also: #on_subscribe)
- #after_unsubscribe(*methods, &block) ⇒ Object (also: #on_unsubscribe)
- #before_subscribe(*methods, &block) ⇒ Object
- #before_unsubscribe(*methods, &block) ⇒ Object
Instance Method Details
#after_subscribe(*methods, &block) ⇒ Object Also known as: on_subscribe
37 38 39 |
# File 'actioncable/lib/action_cable/channel/callbacks.rb', line 37 def after_subscribe(*methods, &block) set_callback(:subscribe, :after, *methods, &block) end |
#after_unsubscribe(*methods, &block) ⇒ Object Also known as: on_unsubscribe
46 47 48 |
# File 'actioncable/lib/action_cable/channel/callbacks.rb', line 46 def after_unsubscribe(*methods, &block) set_callback(:unsubscribe, :after, *methods, &block) end |
#before_subscribe(*methods, &block) ⇒ Object
33 34 35 |
# File 'actioncable/lib/action_cable/channel/callbacks.rb', line 33 def before_subscribe(*methods, &block) set_callback(:subscribe, :before, *methods, &block) end |
#before_unsubscribe(*methods, &block) ⇒ Object
42 43 44 |
# File 'actioncable/lib/action_cable/channel/callbacks.rb', line 42 def before_unsubscribe(*methods, &block) set_callback(:unsubscribe, :before, *methods, &block) end |