Module: Alondra::Connections
Instance Method Summary collapse
- #[](websocket) ⇒ Object
- #[]=(websocket, connection) ⇒ Object
- #connections ⇒ Object
- #delete(websocket) ⇒ Object
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 |
#connections ⇒ Object
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 |