Class: TF2LineParser::Events::Unknown

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

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, unknown) ⇒ Unknown

Returns a new instance of Unknown.



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

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

Class Method Details

.attributesObject



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

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

.regexObject



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

def self.regex
  @regex ||= /#{regex_time} #{regex_unknown}/.freeze
end

.regex_unknownObject



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

def self.regex_unknown
  "(?'unknown'.*)"
end