Module: Alondra::Connections

Extended by:
Connections
Included in:
Connections
Defined in:
lib/alondra/connection.rb

Instance Method Summary collapse

Instance Method Details

#[](websocket) ⇒ Object



11
12
13
# File 'lib/alondra/connection.rb', line 11

def [](websocket)
  connections[websocket]
end

#[]=(websocket, connection) ⇒ Object



15
16
17
# File 'lib/alondra/connection.rb', line 15

def []=(websocket, connection)
  connections[websocket] = connection
end

#connectionsObject



7
8
9
# File 'lib/alondra/connection.rb', line 7

def connections
  @connections ||= {}
end

#delete(websocket) ⇒ Object



19
20
21
# File 'lib/alondra/connection.rb', line 19

def delete(websocket)
  connections.delete websocket
end