Class: RuboCop::CLI::Command::ShowCops
- Defined in:
- lib/rubocop/cli/command/show_cops.rb
Overview
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
A new instance of ShowCops.
- #run ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(env) ⇒ ShowCops
Returns a new instance of ShowCops.
11 12 13 14 15 16 |
# File 'lib/rubocop/cli/command/show_cops.rb', line 11 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
18 19 20 |
# File 'lib/rubocop/cli/command/show_cops.rb', line 18 def run print_available_cops end |