Class: TF2LineParser::Events::RoleChange

Inherits:
PlayerActionEvent show all
Defined in:
lib/tf2_line_parser/events/role_change.rb

Direct Known Subclasses

Spawn

Instance Attribute Summary

Attributes inherited from Event

#airshot, #cap_name, #cap_number, #customkill, #healing, #item, #length, #message, #method, #player, #role, #score, #target, #team, #time, #type, #ubercharge, #unknown, #value, #weapon

Class Method Summary collapse

Methods inherited from PlayerActionEvent

#initialize, regex

Methods inherited from Event

parse_player_section, parse_target_section, #parse_time, regex_cap, regex_console, regex_message, regex_player, regex_results, regex_target, regex_time, time_format, types

Constructor Details

This class inherits a constructor from TF2LineParser::Events::PlayerActionEvent

Class Method Details

.action_textObject



6
7
8
# File 'lib/tf2_line_parser/events/role_change.rb', line 6

def self.action_text
  @action_text ||= 'changed role to'
end

.attributesObject



18
19
20
# File 'lib/tf2_line_parser/events/role_change.rb', line 18

def self.attributes
  @attributes ||= %i[time player_section role]
end

.itemObject



14
15
16
# File 'lib/tf2_line_parser/events/role_change.rb', line 14

def self.item
  :role
end

.regex_actionObject



10
11
12
# File 'lib/tf2_line_parser/events/role_change.rb', line 10

def self.regex_action
  @regex_role ||= '\"(?\'role\'.*)\"'
end