Class: RuboCop::CLI::Command::ShowCops Private
- Defined in:
- lib/rubocop/cli/command/show_cops.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.
Shows the given cops, or all cops by default, and their configurations for the current directory.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(env) ⇒ ShowCops
constructor
private
A new instance of ShowCops.
- #run ⇒ Object private
Methods inherited from Base
Constructor Details
#initialize(env) ⇒ ShowCops
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.
Returns a new instance of ShowCops.
12 13 14 15 16 17 |
# File 'lib/rubocop/cli/command/show_cops.rb', line 12 def initialize(env) super # Load the configs so the require()s are done for custom cops @config = @config_store.for(Dir.pwd) end |
Instance Method Details
#run ⇒ Object
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.
19 20 21 |
# File 'lib/rubocop/cli/command/show_cops.rb', line 19 def run print_available_cops end |