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 117 118 119 120 121 122 |
# 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 .on('-p [PROFILE]', '--select-profile [PROFILE]', 'The list of profiles that the reference.md will use separated by commas') do |pr| @data[:select_profile] = pr.split(',') end .on('-l [LEVEL]', '--select-level [LEVEL]', 'The list of level that the reference.md will use separated by commas') do |l| @data[:select_level] = l.split(',') end end |
Instance Method Details
#execute ⇒ Object
124 125 126 127 |
# File 'lib/abide_dev_utils/cli/cem.rb', line 124 def execute AbideDevUtils::Validate.puppet_module_directory AbideDevUtils::CEM::Generate::Reference.generate(@data) end |