Class: Australium::PlayerConnect
- Defined in:
- lib/australium/events/player_connect.rb
Constant Summary collapse
- LOG_REGEX =
/"(?<player>.+)" connected, address "(?<address>.+)"/
Constants inherited from Event
Event::PROPERTY_REGEX, Event::TIMESTAMP_REGEX
Instance Attribute Summary collapse
-
#address ⇒ String
The IP address of the connecting player.
-
#player ⇒ Player
The Player who connected to the server.
Attributes inherited from Event
Instance Method Summary collapse
-
#initialize(data) ⇒ PlayerConnect
constructor
A new instance of PlayerConnect.
Methods inherited from Event
Constructor Details
#initialize(data) ⇒ PlayerConnect
Returns a new instance of PlayerConnect.
11 12 13 14 |
# File 'lib/australium/events/player_connect.rb', line 11 def initialize(data) super(data) player.address = address end |
Instance Attribute Details
#address ⇒ String
Returns the IP address of the connecting player.
11 12 13 14 |
# File 'lib/australium/events/player_connect.rb', line 11 def initialize(data) super(data) player.address = address end |
#player ⇒ Player
Returns the Australium::Player who connected to the server.
11 12 13 14 |
# File 'lib/australium/events/player_connect.rb', line 11 def initialize(data) super(data) player.address = address end |