Class: ChannelHandler
- Defined in:
- lib/volt/server/channel_handler.rb
Class Method Summary collapse
Instance Method Summary collapse
- #closed ⇒ Object
-
#initialize(session, *args) ⇒ ChannelHandler
constructor
A new instance of ChannelHandler.
- #process_message(message) ⇒ Object
Constructor Details
#initialize(session, *args) ⇒ ChannelHandler
Returns a new instance of ChannelHandler.
12 13 14 15 16 17 18 19 |
# File 'lib/volt/server/channel_handler.rb', line 12 def initialize(session, *args) @session = session @@channels ||= [] @@channels << self super end |
Class Method Details
.message_all ⇒ Object
5 6 7 8 9 10 |
# File 'lib/volt/server/channel_handler.rb', line 5 def self. @@channels.each do |channel| channel.send() end end |
Instance Method Details
#closed ⇒ Object
26 27 28 29 |
# File 'lib/volt/server/channel_handler.rb', line 26 def closed # Remove ourself from the available channels @@channels.delete(self) end |
#process_message(message) ⇒ Object
21 22 23 24 |
# File 'lib/volt/server/channel_handler.rb', line 21 def () puts "Process: #{}" self.class.() end |