Class: Teeworlds::MasterServer
- Inherits:
-
Object
- Object
- Teeworlds::MasterServer
- Defined in:
- lib/teeworlds/masterserver.rb
Instance Attribute Summary collapse
-
#servers ⇒ Object
readonly
Returns the value of attribute servers.
Instance Method Summary collapse
-
#initialize ⇒ MasterServer
constructor
A new instance of MasterServer.
Constructor Details
#initialize ⇒ MasterServer
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
#servers ⇒ Object (readonly)
Returns the value of attribute servers.
3 4 5 |
# File 'lib/teeworlds/masterserver.rb', line 3 def servers @servers end |