Sha256: 04a9ec08e373ce7eb5c61d1670bd774e43ecdc2297a18e8fb00ff22f65744cef

Contents?: true

Size: 644 Bytes

Versions: 24

Compression:

Stored size: 644 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  class CLI
    module Command
      # A subcommand in the CLI.
      class Base
        attr_reader :env

        @subclasses = []

        class << self
          attr_accessor :command_name

          def inherited(subclass)
            @subclasses << subclass
          end

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

        def initialize(env)
          @env = env
          @options = env.options
          @config_store = env.config_store
          @paths = env.paths
        end
      end
    end
  end
end

Version data entries

24 entries across 23 versions & 5 rubygems

Version Path
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/rubocop-0.79.0/lib/rubocop/cli/command/base.rb
rubocop-0.88.0 lib/rubocop/cli/command/base.rb
rbhint-0.87.1.rc1 lib/rubocop/cli/command/base.rb
rubocop-0.87.1 lib/rubocop/cli/command/base.rb
rubocop-0.87.0 lib/rubocop/cli/command/base.rb
rubocop-0.86.0 lib/rubocop/cli/command/base.rb
files.com-1.0.1 vendor/bundle/ruby/2.5.0/gems/rubocop-0.85.1/lib/rubocop/cli/command/base.rb
rbhint-0.85.1.rc2 lib/rubocop/cli/command/base.rb
rbhint-0.85.1.rc1 lib/rubocop/cli/command/base.rb
rubocop-0.85.1 lib/rubocop/cli/command/base.rb
rbhint-0.8.5.rc1 lib/rubocop/cli/command/base.rb
rubocop-0.85.0 lib/rubocop/cli/command/base.rb
rubocop-0.84.0 lib/rubocop/cli/command/base.rb
rubocop-0.83.0 lib/rubocop/cli/command/base.rb
rubocop-0.82.0 lib/rubocop/cli/command/base.rb
rubocop-0.81.0 lib/rubocop/cli/command/base.rb
rubocop-0.80.1 lib/rubocop/cli/command/base.rb
rubocop-0.80.0 lib/rubocop/cli/command/base.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.6.0/gems/rubocop-0.79.0/lib/rubocop/cli/command/base.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/rubocop-0.79.0/lib/rubocop/cli/command/base.rb