123456789_123456789_123456789_123456789_123456789_

Class: RuboCop::CLI::Command::ListEnabledCopsFor Private

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Base
Instance Chain:
self, Base
Inherits: RuboCop::CLI::Command::Base
Defined in: lib/rubocop/cli/command/list_enabled_cops_for.rb

Overview

Lists the cops that will inspect the given file or directory.

Class Attribute Summary

Base - Inherited

Class Method Summary

Base - Inherited

Instance Attribute Summary

Base - Inherited

Instance Method Summary

Instance Method Details

#cops_of_department(registry, department) (private)

[ GitHub ]

  
# File 'lib/rubocop/cli/command/list_enabled_cops_for.rb', line 32

def cops_of_department(registry, department)
  registry.with_department(department)
          .map(&:cop_name)
          .select { |cop_name| @config.cop_enabled?(cop_name) }
end

#run

[ GitHub ]

  
# File 'lib/rubocop/cli/command/list_enabled_cops_for.rb', line 18

def run
  print_available_cops
end