Arie/tf2_line_parser

View on GitHub
lib/tf2_line_parser/events/round_win.rb

Summary

Maintainability
A
15 mins
Test Coverage
# frozen_string_literal: true

module TF2LineParser
  module Events
    class RoundWin < RoundEventWithVariables
      def self.round_type
        @round_type ||= 'Round_Win'
      end

      def self.round_variable_regex
        @round_variable_regex ||= /\(winner "(?'team'Red|Blue)"\)/.freeze
      end

      def self.round_variable
        @round_variable ||= :team
      end
    end
  end
end