class RuboCop::CLI::Command::Base

A subcommand in the CLI. @api private

Attributes

command_name[RW]
env[R]

Public Class Methods

by_command_name(name) click to toggle source
# File lib/rubocop/cli/command/base.rb, line 21
def by_command_name(name)
  @subclasses.detect { |s| s.command_name == name }
end
inherited(subclass) click to toggle source
Calls superclass method
# File lib/rubocop/cli/command/base.rb, line 16
def inherited(subclass)
  super
  @subclasses << subclass
end
new(env) click to toggle source
# File lib/rubocop/cli/command/base.rb, line 26
def initialize(env)
  @env = env
  @options = env.options
  @config_store = env.config_store
  @paths = env.paths
end