123456789_123456789_123456789_123456789_123456789_

Class: RuboCop::CLI::Command::Base Private

Do not use. This class is for internal use only.
Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
RuboCop::CLI::Command::AutoGenerateConfig, RuboCop::CLI::Command::ExecuteRunner, RuboCop::CLI::Command::InitDotfile, RuboCop::CLI::Command::LSP, RuboCop::CLI::Command::ShowCops, RuboCop::CLI::Command::ShowDocsUrl, RuboCop::CLI::Command::SuggestExtensions, RuboCop::CLI::Command::Version
Inherits: Object
Defined in: lib/rubocop/cli/command/base.rb

Overview

A subcommand in the CLI.

Class Attribute Summary

Class Method Summary

Instance Attribute Summary

  • #env readonly Internal use only

Class Attribute Details

.command_name (rw)

[ GitHub ]

  
# File 'lib/rubocop/cli/command/base.rb', line 14

attr_accessor :command_name

Class Method Details

.by_command_name(name)

[ GitHub ]

  
# File 'lib/rubocop/cli/command/base.rb', line 21

def by_command_name(name)
  @subclasses.detect { |s| s.command_name == name }
end

.inherited(subclass)

[ GitHub ]

  
# File 'lib/rubocop/cli/command/base.rb', line 16

def inherited(subclass)
  super
  @subclasses << subclass
end

Instance Attribute Details

#env (readonly)

[ GitHub ]

  
# File 'lib/rubocop/cli/command/base.rb', line 9

attr_reader :env