Sha256: 8019a155116eb3c4fade75ac01536d220bedb2905f895c4193e5a3fbff593ef4

Contents?: true

Size: 686 Bytes

Versions: 7

Compression:

Stored size: 686 Bytes

Contents

module Polonium
  module ServerRunners
    class ServerRunner
      attr_reader :configuration
      def initialize(configuration)
        @configuration = configuration
        @started = false
      end

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

      def stop
        stop_server
        @started = false
      end

      def started?
        @started
      end

      protected
      def start_server
        raise NotImplementedError.new("this is abstract!")
      end

      def stop_server
        raise NotImplementedError.new("this is abstract!")
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
polonium-0.3.3 lib/polonium/server_runners/server_runner.rb
polonium-0.3.1 lib/polonium/server_runners/server_runner.rb
polonium-0.3.2 lib/polonium/server_runners/server_runner.rb
polonium-0.2.1 lib/polonium/server_runners/server_runner.rb
polonium-0.3.0 lib/polonium/server_runners/server_runner.rb
polonium-0.2.2 lib/polonium/server_runners/server_runner.rb
polonium-0.2.0 lib/polonium/server_runners/server_runner.rb