123456789_123456789_123456789_123456789_123456789_

Module: ActionCable::Channel::Callbacks::ClassMethods

Relationships & Source Files
Defined in: actioncable/lib/action_cable/channel/callbacks.rb

Instance Method Summary

Instance Method Details

#after_subscribe(*methods, &block) Also known as: #on_subscribe

[ GitHub ]

  
# File 'actioncable/lib/action_cable/channel/callbacks.rb', line 21

def after_subscribe(*methods, &block)
  set_callback(:subscribe, :after, *methods, &block)
end

#after_unsubscribe(*methods, &block) Also known as: #on_unsubscribe

[ GitHub ]

  
# File 'actioncable/lib/action_cable/channel/callbacks.rb', line 30

def after_unsubscribe(*methods, &block)
  set_callback(:unsubscribe, :after, *methods, &block)
end

#before_subscribe(*methods, &block)

[ GitHub ]

  
# File 'actioncable/lib/action_cable/channel/callbacks.rb', line 17

def before_subscribe(*methods, &block)
  set_callback(:subscribe, :before, *methods, &block)
end

#before_unsubscribe(*methods, &block)

[ GitHub ]

  
# File 'actioncable/lib/action_cable/channel/callbacks.rb', line 26

def before_unsubscribe(*methods, &block)
  set_callback(:unsubscribe, :before, *methods, &block)
end

#on_subscribe(*methods, &block)

Alias for #after_subscribe.

[ GitHub ]

  
# File 'actioncable/lib/action_cable/channel/callbacks.rb', line 24

alias_method :on_subscribe, :after_subscribe

#on_unsubscribe(*methods, &block)

Alias for #after_unsubscribe.

[ GitHub ]

  
# File 'actioncable/lib/action_cable/channel/callbacks.rb', line 33

alias_method :on_unsubscribe, :after_unsubscribe