Class: Steam::ServerList
- Inherits:
-
Object
- Object
- Steam::ServerList
- Includes:
- Enumerable
- Defined in:
- lib/steam/server_list.rb
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.
Instance Method Summary collapse
-
#each(&block) ⇒ Object
Iterates over each Server in the list.
-
#initialize ⇒ ServerList
constructor
Instantiate a ServerList.
Constructor Details
#initialize ⇒ ServerList
TODO:
Add more servers
Instantiate a ServerList. Adds at least one Server object to the list
17 18 19 20 21 |
# File 'lib/steam/server_list.rb', line 17 def initialize @servers = [ Server.new('208.78.164.12', 27_017) ] end |
Instance Method Details
#each(&block) ⇒ Object
Iterates over each Server in the list
30 31 32 |
# File 'lib/steam/server_list.rb', line 30 def each(&block) @servers.each(&block) end |