class Steamcr::ServerList

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

Defined in:

steamcr/server_list.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

Instantiate a ServerList. Adds at least one Server object to the list

@todo Add more servers


[View source]

Instance Method Detail

def each(&block : Server -> ) #

Iterates over each Server in the list

@example Iterating a server list list = ServerList.new list.each do |server| puts server.host end


[View source]