Class: Abide::CLI::CemGenerateReference
- Inherits:
-
AbideCommand
- Object
- CmdParse::Command
- AbideCommand
- Abide::CLI::CemGenerateReference
- Defined in:
- lib/abide_dev_utils/cli/cem.rb
Constant Summary collapse
- CMD_NAME =
'reference'
- CMD_SHORT =
'Generates a reference doc for the module'
- CMD_LONG =
'Generates a reference doc for the module'
Constants included from AbideDevUtils::Config
AbideDevUtils::Config::DEFAULT_PATH
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ CemGenerateReference
constructor
A new instance of CemGenerateReference.
Methods included from AbideDevUtils::Config
config_section, #config_section, fetch, #fetch, to_h, #to_h
Constructor Details
#initialize ⇒ CemGenerateReference
Returns a new instance of CemGenerateReference.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/abide_dev_utils/cli/cem.rb', line 99 def initialize super(CMD_NAME, CMD_SHORT, CMD_LONG, takes_commands: false) .on('-o [FILE]', '--out-file [FILE]', 'Path to save the updated config file') do |o| @data[:out_file] = o end .on('-f [FORMAT]', '--format [FORMAT]', 'Format to save reference as') do |f| @data[:format] = f end .on('-v', '--verbose', 'Verbose output') do @data[:debug] = true end .on('-q', '--quiet', 'Quiet output') do @data[:quiet] = true end .on('-s', '--strict', 'Fails if there are any errors') do @data[:strict] = true end end |
Instance Method Details
#execute ⇒ Object
118 119 120 121 |
# File 'lib/abide_dev_utils/cli/cem.rb', line 118 def execute AbideDevUtils::Validate.puppet_module_directory AbideDevUtils::CEM::Generate::Reference.generate(@data) end |