Class: WebSocketClient::DebugSocket

Inherits:
Object
  • Object
show all
Defined in:
lib/websocket_client/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(socket) ⇒ DebugSocket

Returns a new instance of DebugSocket.



11
12
13
# File 'lib/websocket_client/client.rb', line 11

def initialize(socket)
  @socket = socket
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



15
16
17
18
# File 'lib/websocket_client/client.rb', line 15

def method_missing(method, *args)
  puts "> #{method}(#{args.join( ', ')})"
  @socket.__send__( method, *args )
end