Class: TF2LineParser::Events::MedicDeathEx
- Defined in:
- lib/tf2_line_parser/events/medic_death_ex.rb
Instance Attribute Summary collapse
-
#player ⇒ Object
readonly
Returns the value of attribute player.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
-
#ubercharge ⇒ Object
readonly
Returns the value of attribute ubercharge.
Attributes inherited from Event
#airshot, #cap_name, #cap_number, #customkill, #healing, #item, #length, #message, #method, #role, #score, #target, #team, #type, #unknown, #value, #weapon
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(time, player_name, player_uid, player_steam_id, player_team, uberpct) ⇒ MedicDeathEx
constructor
A new instance of MedicDeathEx.
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
#initialize(time, player_name, player_uid, player_steam_id, player_team, uberpct) ⇒ MedicDeathEx
Returns a new instance of MedicDeathEx.
18 19 20 21 22 |
# File 'lib/tf2_line_parser/events/medic_death_ex.rb', line 18 def initialize(time, player_name, player_uid, player_steam_id, player_team, uberpct) @time = parse_time(time) @player = Player.new(player_name, player_uid, player_steam_id, player_team) @ubercharge = uberpct.to_i end |
Instance Attribute Details
#player ⇒ Object (readonly)
Returns the value of attribute player.
4 5 6 |
# File 'lib/tf2_line_parser/events/medic_death_ex.rb', line 4 def player @player end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
4 5 6 |
# File 'lib/tf2_line_parser/events/medic_death_ex.rb', line 4 def time @time end |
#ubercharge ⇒ Object (readonly)
Returns the value of attribute ubercharge.
4 5 6 |
# File 'lib/tf2_line_parser/events/medic_death_ex.rb', line 4 def ubercharge @ubercharge end |
Class Method Details
.attributes ⇒ Object
14 15 16 |
# File 'lib/tf2_line_parser/events/medic_death_ex.rb', line 14 def self.attributes @attributes ||= %i[time player_section uberpct] end |
.regex ⇒ Object
6 7 8 |
# File 'lib/tf2_line_parser/events/medic_death_ex.rb', line 6 def self.regex @regex ||= /#{regex_time} #{regex_player} triggered "medic_death_ex" #{regex_uberpct}/.freeze end |
.regex_uberpct ⇒ Object
10 11 12 |
# File 'lib/tf2_line_parser/events/medic_death_ex.rb', line 10 def self.regex_uberpct @regex_uberpct ||= '\(uberpct "(?\'uberpct\'\d+)"\)' end |