Class: TF2LineParser::Events::Score
- Defined in:
- lib/tf2_line_parser/events/score.rb
Direct Known Subclasses
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
Instance Method Summary collapse
-
#initialize(time, team, score) ⇒ Score
constructor
A new instance of Score.
Methods inherited from Event
#parse_time, regex_cap, regex_console, regex_message, regex_player, regex_results, regex_target, regex_time, time_format, types
Constructor Details
#initialize(time, team, score) ⇒ Score
Returns a new instance of Score.
18 19 20 21 22 |
# File 'lib/tf2_line_parser/events/score.rb', line 18 def initialize(time, team, score) @time = parse_time(time) @team = team @score = score end |
Class Method Details
.attributes ⇒ Object
14 15 16 |
# File 'lib/tf2_line_parser/events/score.rb', line 14 def self.attributes @attributes ||= [:time, :team, :score] end |
.regex_score ⇒ Object
6 7 8 |
# File 'lib/tf2_line_parser/events/score.rb', line 6 def self.regex_score @regex_score ||= '\"(?\'score\'\d+)\"'.freeze end |
.regex_team ⇒ Object
10 11 12 |
# File 'lib/tf2_line_parser/events/score.rb', line 10 def self.regex_team @regex_team ||= 'Team \"(?\'team\'Red|Blue)\"'.freeze end |