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

Uses the internal channel to disconnect the connection.
def disconnect
  server.broadcast internal_channel, type: "disconnect"
end

def identifiers

Returns all the identifiers that were applied to this connection.
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