Sha256: 2ea309c0681eb9496a735a467ae40699079543ddfd06aa9ae1f693ae5f2c0079

Contents?: true

Size: 572 Bytes

Versions: 2

Compression:

Stored size: 572 Bytes

Contents

module Polonium
  class ServerRunner
    attr_accessor :configuration, :thread_class
    def initialize
      @started = false
    end

    def start
      @thread_class.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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
polonium-0.1.0 lib/polonium/server_runner.rb
polonium-0.1.1 lib/polonium/server_runner.rb