Class: Mainline::Core

Inherits:
Object
  • Object
show all
Defined in:
lib/mainline/core.rb

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ Core

Returns a new instance of Core.



20
21
22
# File 'lib/mainline/core.rb', line 20

def initialize(configuration)
  @config = configuration
end

Instance Method Details

#startObject



24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/mainline/core.rb', line 24

def start
  unless @server
    if @config
      @server = Mainline::Server.new(@config)
    else
      @server = Mainline::NilServer.new(@config)
    end
    Thread.new do
      @server.start
    end
  end
end