Module: Docscribe::CLI::ConfigDump

Defined in:
lib/docscribe/cli/config_dump.rb

Overview

Print the fully resolved configuration as YAML.

Constant Summary collapse

<<~TEXT
  Usage: docscribe config [options]

  Print the fully resolved configuration as YAML.

  Options:
TEXT

Class Method Summary collapse

Class Method Details

.run(argv) ⇒ Integer

Parameters:

  • argv (Array<String>)

Returns:

  • (Integer)


23
24
25
26
27
28
29
30
31
32
# File 'lib/docscribe/cli/config_dump.rb', line 23

def run(argv)
  opts = parse_options(argv)
  return 0 if opts[:help]

  conf = Docscribe::Config.load(opts[:config])
  conf = Docscribe::CLI::ConfigBuilder.build(conf, parse_cli_overrides(argv))

  puts conf.to_h.to_yaml
  0
end