Class: TF2LineParser::Events::RoundEventWithoutVariables

Inherits:
Event
  • Object
show all
Defined in:
lib/tf2_line_parser/events/round_event_without_variables.rb

Direct Known Subclasses

RoundStalemate, RoundStart

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

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) ⇒ RoundEventWithoutVariables

Returns a new instance of RoundEventWithoutVariables.



15
16
17
# File 'lib/tf2_line_parser/events/round_event_without_variables.rb', line 15

def initialize(time)
  @time = parse_time(time)
end

Class Method Details

.attributesObject



11
12
13
# File 'lib/tf2_line_parser/events/round_event_without_variables.rb', line 11

def self.attributes
  @attributes ||= [:time]
end

.regexObject



7
8
9
# File 'lib/tf2_line_parser/events/round_event_without_variables.rb', line 7

def self.regex
  @regex ||= /#{regex_time} World triggered "#{round_type}"/.freeze
end