class ActionCable::SubscriptionAdapter::Redis::Listener::SubscribedClient
Public Class Methods
new(raw_client)
click to toggle source
# File lib/action_cable/subscription_adapter/redis.rb, line 168 def initialize(raw_client) @raw_client = raw_client end
Public Instance Methods
subscribe(*channel)
click to toggle source
# File lib/action_cable/subscription_adapter/redis.rb, line 172 def subscribe(*channel) send_command("subscribe", *channel) end
unsubscribe(*channel)
click to toggle source
# File lib/action_cable/subscription_adapter/redis.rb, line 176 def unsubscribe(*channel) send_command("unsubscribe", *channel) end
Private Instance Methods
send_command(*command)
click to toggle source
# File lib/action_cable/subscription_adapter/redis.rb, line 181 def send_command(*command) @raw_client.write(command) very_raw_connection = @raw_client.connection.instance_variable_defined?(:@connection) && @raw_client.connection.instance_variable_get(:@connection) if very_raw_connection && very_raw_connection.respond_to?(:flush) very_raw_connection.flush end nil end