Class: RuboCop::CLI::Command::Version Private

Inherits:
Base
  • Object
show all
Defined in:
lib/rubocop/cli/command/version.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Display version.

Instance Attribute Summary

Attributes inherited from Base

#env

Instance Method Summary collapse

Methods inherited from Base

by_command_name, inherited, #initialize

Constructor Details

This class inherits a constructor from RuboCop::CLI::Command::Base

Instance Method Details

#runObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


11
12
13
14
# File 'lib/rubocop/cli/command/version.rb', line 11

def run
  puts RuboCop::Version.version(debug: false) if @options[:version]
  puts RuboCop::Version.version(debug: true, env: env) if @options[:verbose_version]
end