class Pokan::Cluster::Autorunner

Class used for automatically run a server that include Pokan::Cluster module.

Attributes

options[RW]
server[RW]

Public Class Methods

register_server(server_class) click to toggle source

Registers a new server, that will be started when the method Pokan::Cluster::Autorunner.run gets called.

# File lib/pokan-cluster/autorunner.rb, line 16
def self.register_server(server_class)
  @server = server_class
end
run() click to toggle source

Calls the method ‘start` on every registered server

# File lib/pokan-cluster/autorunner.rb, line 26
def self.run
  @server.start(@options)
end
run?() click to toggle source

Checks if we have any server to start

# File lib/pokan-cluster/autorunner.rb, line 21
def self.run?
  @server.respond_to? :start
end