Class: Polonium::ServerRunners::ServerRunner
- Inherits:
-
Object
- Object
- Polonium::ServerRunners::ServerRunner
- Defined in:
- lib/polonium/server_runners/server_runner.rb
Direct Known Subclasses
ExternalServerRunner, MongrelServerRunner, WebrickServerRunner
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
Instance Method Summary collapse
-
#initialize(configuration) ⇒ ServerRunner
constructor
A new instance of ServerRunner.
- #start ⇒ Object
- #started? ⇒ Boolean
- #stop ⇒ Object
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
#configuration ⇒ Object (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
#start ⇒ Object
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
22 23 24 |
# File 'lib/polonium/server_runners/server_runner.rb', line 22 def started? @started end |
#stop ⇒ Object
17 18 19 20 |
# File 'lib/polonium/server_runners/server_runner.rb', line 17 def stop stop_server @started = false end |