Class: CC::CLI::Engines::List

Inherits:
EngineCommand show all
Defined in:
lib/cc/cli/engines/list.rb

Constant Summary collapse

SHORT_HELP =
"List all available engines".freeze

Constants inherited from Command

Command::CODECLIMATE_YAML, Command::NAMESPACE

Instance Method Summary collapse

Methods inherited from EngineCommand

#engine_registry

Methods inherited from Command

[], abstract!, abstract?, all, command_name, #execute, help, inherited, #initialize, short_help, synopsis

Methods included from Output

#colorize, #fatal, #rainbow, #say, #success, #terminal, #warn

Constructor Details

This class inherits a constructor from CC::CLI::Command

Instance Method Details

#runObject



7
8
9
10
11
12
13
14
# File 'lib/cc/cli/engines/list.rb', line 7

def run
  say "Available engines:"
  engine_registry.
    sort_by { |engine, _| engine.name }.
    each do |engine, |
      say "- #{engine.name}: #{.description}"
    end
end