Sha256: 278d07454aa392bb88bf4dbb98ade5b10efceb14dc8a76243fec2aac6fbc7bf3

Contents?: true

Size: 453 Bytes

Versions: 26

Compression:

Stored size: 453 Bytes

Contents

module GameServer::ServerStarter

  def self.included(base)
    base.extend(ClassMethods)
  end


  
  
  module ClassMethods
  
    def listner(klass)
    
      module_eval %(
        def self.start_server(opts = { })
          opts[:port] ||= 10667
          opts[:host] ||= '172.16.90.1'
          EventMachine::run {
            EventMachine::start_server opts[:host], opts[:port], #{klass}
          }
        end
      )
    end
    
  end


end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
game-server-0.3.0 lib/server_starter.rb
game-server-0.2.4 lib/server_starter.rb
game-server-0.2.3 lib/server_starter.rb
game-server-0.2.2 lib/server_starter.rb
game-server-0.2.1 lib/server_starter.rb
game-server-0.2.0 lib/server_starter.rb