Class: Polonium::ServerRunners::ServerRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/polonium/server_runners/server_runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ ServerRunner

Returns a new instance of ServerRunner.



5
6
7
8
# File 'lib/polonium/server_runners/server_runner.rb', line 5

def initialize(configuration)
  @configuration = configuration
  @started = false
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



4
5
6
# File 'lib/polonium/server_runners/server_runner.rb', line 4

def configuration
  @configuration
end

Instance Method Details

#startObject



10
11
12
13
14
15
# File 'lib/polonium/server_runners/server_runner.rb', line 10

def start
  Thread.start do
    start_server
  end
  @started = true
end

#started?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/polonium/server_runners/server_runner.rb', line 22

def started?
  @started
end

#stopObject



17
18
19
20
# File 'lib/polonium/server_runners/server_runner.rb', line 17

def stop
  stop_server
  @started = false
end