class ActionCable::RemoteConnections::RemoteConnection
Exists solely for the purpose of calling #disconnect on that connection.
Represents a single remote connection found via ActionCable.server.remote_connections.where(*)
.
def disconnect
def disconnect server.broadcast internal_channel, type: "disconnect" end
def identifiers
def identifiers server.connection_identifiers end
def initialize(server, ids)
def initialize(server, ids) @server = server set_identifier_instance_vars(ids) end
def set_identifier_instance_vars(ids)
def set_identifier_instance_vars(ids) raise InvalidIdentifiersError unless valid_identifiers?(ids) ids.each { |k, v| instance_variable_set("@#{k}", v) } end
def valid_identifiers?(ids)
def valid_identifiers?(ids) keys = ids.keys identifiers.all? { |id| keys.include?(id) } end