Class: Australium::PlayerConnect

Inherits:
Event show all
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_FORMAT, Event::TIMESTAMP_REGEX

Instance Attribute Summary collapse

Attributes inherited from Event

#raw

Instance Method Summary collapse

Methods inherited from Event

inherited, #to_s

Methods inherited from OpenStruct

#initialize_clone

Constructor Details

#initialize(data) ⇒ PlayerConnect


11
12
13
14
15
# File 'lib/australium/events/player_connect.rb', line 11

def initialize(data)
  super(data)
  player.address = address
  player[:connected?, timestamp] = true
end

Instance Attribute Details

#addressString


11
12
13
14
15
# File 'lib/australium/events/player_connect.rb', line 11

def initialize(data)
  super(data)
  player.address = address
  player[:connected?, timestamp] = true
end

#playerPlayer


11
12
13
14
15
# File 'lib/australium/events/player_connect.rb', line 11

def initialize(data)
  super(data)
  player.address = address
  player[:connected?, timestamp] = true
end