Class: Volt::SocketConnectionHandlerStub

Inherits:
Object
  • Object
show all
Defined in:
lib/volt/server/socket_connection_handler_stub.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(channel_stub) ⇒ SocketConnectionHandlerStub

Returns a new instance of SocketConnectionHandlerStub.



11
12
13
# File 'lib/volt/server/socket_connection_handler_stub.rb', line 11

def initialize(channel_stub)
  @channel_stub = channel_stub
end

Class Method Details

.dispatcherObject



7
8
9
# File 'lib/volt/server/socket_connection_handler_stub.rb', line 7

def self.dispatcher
  @@dispatcher
end

.dispatcher=(val) ⇒ Object



3
4
5
# File 'lib/volt/server/socket_connection_handler_stub.rb', line 3

def self.dispatcher=(val)
  @@dispatcher = val
end

.send_message_all(skip_channel = nil, *args) ⇒ Object

Sends a message to all, optionally skipping a users channel



16
17
18
# File 'lib/volt/server/socket_connection_handler_stub.rb', line 16

def self.send_message_all(skip_channel = nil, *args)
  # Stub
end

Instance Method Details

#process_message(message) ⇒ Object



20
21
22
# File 'lib/volt/server/socket_connection_handler_stub.rb', line 20

def process_message(message)
  @@dispatcher.dispatch(self, message)
end

#send_message(*args) ⇒ Object



24
25
26
# File 'lib/volt/server/socket_connection_handler_stub.rb', line 24

def send_message(*args)
  @channel_stub.message_received(*args)
end