lib/faye/websocket/api/event_target.rb in faye-websocket-0.10.8 vs lib/faye/websocket/api/event_target.rb in faye-websocket-0.10.9
- old
+ new
@@ -3,13 +3,13 @@
include ::WebSocket::Driver::EventEmitter
events = %w[open message error close]
events.each do |event_type|
- define_method "on#{event_type}=" do |handler|
+ define_method "on#{ event_type }=" do |handler|
EventMachine.next_tick do
flush(event_type, handler)
- instance_variable_set("@on#{event_type}", handler)
+ instance_variable_set("@on#{ event_type }", handler)
end
end
end
def add_event_listener(event_type, listener, use_capture = false)