Class: Teeworlds::MasterServer

Inherits:
Object
  • Object
show all
Defined in:
lib/teeworlds/masterserver.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMasterServer

Returns a new instance of MasterServer.



5
6
7
8
9
10
11
# File 'lib/teeworlds/masterserver.rb', line 5

def initialize
  @servers = []

  1.upto(4) do |num|
    connect_and_request("master#{num}.teeworlds.com", 8300)
  end
end

Instance Attribute Details

#serversObject (readonly)

Returns the value of attribute servers.



3
4
5
# File 'lib/teeworlds/masterserver.rb', line 3

def servers
  @servers
end