Module: Genesis::Server::ClassMethods

Defined in:
lib/genesis/server.rb

Overview

Methods to be injected onto the class

Instance Method Summary collapse

Instance Method Details

#start(port, routes, **kwargs, &block) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/genesis/server.rb', line 14

def start(port, routes, **kwargs, &block)
  @port = port
  @handle_routes = routes || []
  @channel = kwargs[:channel]
  @args = kwargs

  # Allow a custom, non EM, server to be run
  if block_given? && block
    yield
  else
    default_start
  end
end