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