Module: Docscribe::CLI::Init
- Defined in:
- lib/docscribe/cli/init.rb
Overview
Generate starter Docscribe configuration.
Constant Summary collapse
- BANNER =
<<~TEXT Usage: docscribe init [options] Generate a starter docscribe.yml configuration file. Options: TEXT
Class Method Summary collapse
-
.run(argv) ⇒ Integer
Create or print a starter Docscribe configuration file.
Class Method Details
.run(argv) ⇒ Integer
Create or print a starter Docscribe configuration file.
Supported behaviors:
- write
docscribe.yml(default) - write to a custom path via
--config - overwrite an existing file via
--force - print the template to STDOUT via
--stdout
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/docscribe/cli/init.rb', line 29 def run(argv) opts = (argv) return 0 if opts[:help] yaml = Docscribe::Config.default_yaml if opts[:stdout] puts yaml return 0 end write_init_config(opts, yaml) end |