Module: Docscribe::CLI
- Defined in:
- lib/docscribe/cli.rb,
lib/docscribe/cli/run.rb,
lib/docscribe/cli/init.rb,
lib/docscribe/cli/sigs.rb,
lib/docscribe/cli/server.rb,
lib/docscribe/cli/options.rb,
lib/docscribe/cli/rbs_gen.rb,
lib/docscribe/cli/coverage.rb,
lib/docscribe/cli/generate.rb,
lib/docscribe/cli/formatters.rb,
lib/docscribe/cli/config_dump.rb,
lib/docscribe/cli/update_types.rb,
lib/docscribe/cli/config_builder.rb,
lib/docscribe/cli/formatters/json.rb,
lib/docscribe/cli/formatters/text.rb,
lib/docscribe/cli/formatters/sarif.rb,
lib/docscribe/cli/check_for_comments.rb
Overview
CLI entry point and command dispatch.
Defined Under Namespace
Modules: CheckForComments, ConfigBuilder, ConfigDump, Coverage, Formatters, Generate, Init, Options, RbsGen, Run, ServerCmd, Sigs, UpdateTypes
Constant Summary collapse
- COMMANDS =
{ 'check_for_comments' => :CheckForComments, 'config' => :ConfigDump, 'coverage' => :Coverage, 'generate' => :Generate, 'init' => :Init, 'rbs' => :RbsGen, 'server' => :ServerCmd, 'sigs' => :Sigs, 'update_types' => :UpdateTypes }.freeze
- SUBCOMMAND_FILES =
Subcommands whose file name differs from the command name.
{ 'config' => 'config_dump', 'rbs' => 'rbs_gen' }.freeze
Class Method Summary collapse
Class Method Details
.run(argv) ⇒ Integer
30 31 32 33 34 35 36 |
# File 'lib/docscribe/cli.rb', line 30 def run(argv) argv = argv.dup return dispatch_subcommand(argv) if subcommand?(argv.first) = Docscribe::CLI::Options.parse!(argv) Docscribe::CLI::Run.run(options: , argv: argv) end |