def parser_class(ruby_version)
      case ruby_version
      when 2.2
        require 'parser/ruby22'
        Parser::Ruby22
      when 2.3
        require 'parser/ruby23'
        Parser::Ruby23
      when 2.4
        require 'parser/ruby24'
        Parser::Ruby24
      when 2.5
        require 'parser/ruby25'
        Parser::Ruby25
      when 2.6
        require 'parser/ruby26'
        Parser::Ruby26
      else
        raise ArgumentError, "Unknown Ruby version: #{ruby_version.inspect}"
      end
    end
def parser_class(ruby_version)
      case ruby_version
      when 2.2
        require 'parser/ruby22'
        Parser::Ruby22
      when 2.3
        require 'parser/ruby23'
        Parser::Ruby23
      when 2.4
        require 'parser/ruby24'
        Parser::Ruby24
      when 2.5
        require 'parser/ruby25'
        Parser::Ruby25
      when 2.6
        require 'parser/ruby26'
        Parser::Ruby26
      else
        raise ArgumentError, "Unknown Ruby version: #{ruby_version.inspect}"
      end
    end
rubocop:disable Metrics/MethodLength