Module: SocketIo::Websocket::ClassMethods

Defined in:
lib/socket.io/websocket.rb

Instance Method Summary collapse

Instance Method Details

#eventsObject



28
29
30
# File 'lib/socket.io/websocket.rb', line 28

def events
  Websocket.class_variable_get(:@@events)[self]
end

#on(event, method) ⇒ Object



32
33
34
# File 'lib/socket.io/websocket.rb', line 32

def on(event, method)
  events[event.to_s] = method
end