Class: Wc3Protocol::ServerInfo
- Inherits:
-
Object
- Object
- Wc3Protocol::ServerInfo
- Defined in:
- lib/wc3_protocol/server_info.rb
Instance Attribute Summary collapse
-
#game_type ⇒ Object
readonly
Returns the value of attribute game_type.
-
#game_version ⇒ Object
readonly
Returns the value of attribute game_version.
-
#map_name ⇒ Object
readonly
Returns the value of attribute map_name.
-
#max_slots ⇒ Object
readonly
Returns the value of attribute max_slots.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#remote_address ⇒ Object
readonly
Returns the value of attribute remote_address.
-
#remote_port ⇒ Object
readonly
Returns the value of attribute remote_port.
-
#taken_slots ⇒ Object
readonly
Returns the value of attribute taken_slots.
Instance Method Summary collapse
-
#initialize(message) ⇒ ServerInfo
constructor
A new instance of ServerInfo.
Constructor Details
#initialize(message) ⇒ ServerInfo
Returns a new instance of ServerInfo.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/wc3_protocol/server_info.rb', line 16 def initialize() @name = .game_name @taken_slots = .game_number_of_slots - .game_remaining_slots @max_slots = .game_number_of_slots @map_name = .game_map_name @remote_address = .sender_ip_address @remote_port = .sender_port @game_version = .game_version @game_type = .game_type end |
Instance Attribute Details
#game_type ⇒ Object (readonly)
Returns the value of attribute game_type.
9 10 11 |
# File 'lib/wc3_protocol/server_info.rb', line 9 def game_type @game_type end |
#game_version ⇒ Object (readonly)
Returns the value of attribute game_version.
10 11 12 |
# File 'lib/wc3_protocol/server_info.rb', line 10 def game_version @game_version end |
#map_name ⇒ Object (readonly)
Returns the value of attribute map_name.
7 8 9 |
# File 'lib/wc3_protocol/server_info.rb', line 7 def map_name @map_name end |
#max_slots ⇒ Object (readonly)
Returns the value of attribute max_slots.
6 7 8 |
# File 'lib/wc3_protocol/server_info.rb', line 6 def max_slots @max_slots end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/wc3_protocol/server_info.rb', line 4 def name @name end |
#remote_address ⇒ Object (readonly)
Returns the value of attribute remote_address.
12 13 14 |
# File 'lib/wc3_protocol/server_info.rb', line 12 def remote_address @remote_address end |
#remote_port ⇒ Object (readonly)
Returns the value of attribute remote_port.
13 14 15 |
# File 'lib/wc3_protocol/server_info.rb', line 13 def remote_port @remote_port end |
#taken_slots ⇒ Object (readonly)
Returns the value of attribute taken_slots.
5 6 7 |
# File 'lib/wc3_protocol/server_info.rb', line 5 def taken_slots @taken_slots end |