Class: Australium::PlayerNameChange

Inherits:
Event
  • Object
show all
Defined in:
lib/australium/events/player_name_change.rb

Constant Summary collapse

LOG_REGEX =
/"(?<player>.+)" changed name to "(?<new_name>.+)"/

Constants inherited from Event

Event::PROPERTY_REGEX, Event::TIMESTAMP_REGEX

Instance Attribute Summary collapse

Attributes inherited from Event

#raw

Instance Method Summary collapse

Methods inherited from Event

inherited, #to_s

Constructor Details

#initialize(data) ⇒ PlayerNameChange

Returns a new instance of PlayerNameChange.



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

def initialize(data)
  super(data)
  player.nick = new_name
end

Instance Attribute Details

#new_nameString

Returns the name the player changed to.

Returns:

  • (String)

    the name the player changed to.



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

def initialize(data)
  super(data)
  player.nick = new_name
end

#playerPlayer

Returns the Australium::Player whose name changed.

Returns:



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

def initialize(data)
  super(data)
  player.nick = new_name
end