Class: Karafka::Web::Cli::Base

Inherits:
Cli::Base
  • Object
show all
Includes:
Helpers::Colorize
Defined in:
lib/karafka/web/cli/base.rb

Overview

Base command for all the Web Cli commands

Direct Known Subclasses

Help, Install, Migrate, Reset, Uninstall

Class Method Summary collapse

Class Method Details

.commandsArray<Class>

Returns available commands.

Returns:

  • (Array<Class>)

    available commands



12
13
14
15
16
17
18
# File 'lib/karafka/web/cli/base.rb', line 12

def commands
  ObjectSpace
    .each_object(Class)
    .select { |klass| klass.superclass == Karafka::Web::Cli::Base }
    .reject { |klass| klass.to_s.end_with?('::Base') }
    .sort_by(&:name)
end