Class: Rocket::Server::Channel
- Inherits:
-
EM::Channel
- Object
- EM::Channel
- Rocket::Server::Channel
- Defined in:
- lib/rocket/server/channel.rb
Class Method Summary collapse
-
.[](id) ⇒ Object
Get specfied channel for given app or create it if doesn’t exist.
-
.channels ⇒ Object
Returns list of registered channels.
Class Method Details
.[](id) ⇒ Object
10 11 12 13 |
# File 'lib/rocket/server/channel.rb', line 10 def self.[](id) app, name = id.to_a.flatten channels[[app, name]] ||= new end |
.channels ⇒ Object
Returns list of registered channels.
16 17 18 |
# File 'lib/rocket/server/channel.rb', line 16 def self.channels @channels ||= {} end |