Class: Australium::PlayerNameChange
- 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
-
#new_name ⇒ String
The name the player changed to.
-
#player ⇒ Player
The Player whose name changed.
Attributes inherited from Event
Instance Method Summary collapse
-
#initialize(data) ⇒ PlayerNameChange
constructor
A new instance of PlayerNameChange.
Methods inherited from Event
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_name ⇒ String
Returns 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 |
#player ⇒ Player
Returns the Australium::Player whose name changed.
11 12 13 14 |
# File 'lib/australium/events/player_name_change.rb', line 11 def initialize(data) super(data) player.nick = new_name end |