class Steamcr::ServerList
- Steamcr::ServerList
- Reference
- Object
Overview
Represents a list of Servers we can connect to. There are a few defaults but an instance of this list should be updated as servers are sent down from Steam.
@example Getting a random server list = ServerList.new list.sample # => Server
Included Modules
- Enumerable(Steamcr::Server)
Defined in:
steamcr/server_list.crConstructors
-
.new
Instantiate a ServerList.
Instance Method Summary
-
#each(&block : Server -> )
Iterates over each Server in the list
Constructor Detail
def self.new
#
Instantiate a ServerList. Adds at least one Server object to the list
@todo Add more servers
Instance Method Detail
Iterates over each Server in the list
@example Iterating a server list list = ServerList.new list.each do |server| puts server.host end