Module: EventMachine::WebSocket

Defined in:
lib/web-repl/patch.rb

Class Method Summary collapse

Class Method Details

.run(options = {}, &block) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/web-repl/patch.rb', line 15

def self.run(options = {}, &block)
  if EM.reactor_running?
    handle_run(options, &block)
  else
    EM.run { handle_run(options, &block) }
  end      
end

.start(options = {}, &block) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/web-repl/patch.rb', line 6

def self.start(options = {}, &block)
  EM.epoll
  if EM.reactor_running?
    handle_start(options, &block)
  else
    EM.run { handle_start(options, &block) }
  end
end