123456789_123456789_123456789_123456789_123456789_

Module: ActionCable::SubscriptionAdapter::ChannelPrefix

Do not use. This module is for internal use only.
Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb

Instance Method Summary

Instance Method Details

#broadcast(channel, payload)

[ GitHub ]

  
# File 'actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb', line 6

def broadcast(channel, payload)
  channel = channel_with_prefix(channel)
  super
end

#channel_with_prefix(channel) (private)

Returns the channel name, including channel_prefix specified in cable.yml

[ GitHub ]

  
# File 'actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb', line 23

def channel_with_prefix(channel)
  [@server.config.cable[:channel_prefix], channel].compact.join(":")
end

#subscribe(channel, callback, success_callback = nil)

[ GitHub ]

  
# File 'actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb', line 11

def subscribe(channel, callback, success_callback = nil)
  channel = channel_with_prefix(channel)
  super
end

#unsubscribe(channel, callback)

[ GitHub ]

  
# File 'actioncable/lib/action_cable/subscription_adapter/channel_prefix.rb', line 16

def unsubscribe(channel, callback)
  channel = channel_with_prefix(channel)
  super
end