Sha256: 7b8c4023edcd8bcd6472cb38b54c580c1e921b9460d54a505e6ce9c0e6a055ba

Contents?: true

Size: 812 Bytes

Versions: 1

Compression:

Stored size: 812 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  # This module holds the RuboCop version information.
  module Version
    STRING = '0.93.1'

    MSG = '%<version>s (using Parser %<parser_version>s, '\
          'rubocop-ast %<rubocop_ast_version>s, ' \
          'running on %<ruby_engine>s %<ruby_version>s %<ruby_platform>s)'

    # @api private
    def self.version(debug: false)
      if debug
        format(MSG, version: STRING, parser_version: Parser::VERSION,
                    rubocop_ast_version: RuboCop::AST::Version::STRING,
                    ruby_engine: RUBY_ENGINE, ruby_version: RUBY_VERSION,
                    ruby_platform: RUBY_PLATFORM)
      else
        STRING
      end
    end

    # @api private
    def self.document_version
      STRING.match('\d+\.\d+').to_s
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubocop-0.93.1 lib/rubocop/version.rb