Class: App
- Inherits:
-
Thor
- Object
- Thor
- App
- Includes:
- Utils::MyLogger
- Defined in:
- lib/cli/aws-must-cli.rb
Constant Summary collapse
- PROGNAME =
logger progname
"main"
- DEAFAULT_TEMPLATE =
default values
"root"
- DEFAUL_FOLD_ON =
default output for +++fold-on+++ tag
"<div class='fold'>Check to show template: <input type='checkbox' class='toggle'/><div>"
- DEFAUL_FOLD_OFF =
default output for +++fold-off+++ tag
"</div></div>"
Constants included from Utils::MyLogger
Class Method Summary collapse
Instance Method Summary collapse
- #ddoc(pattern) ⇒ Object
- #doc(template_name = DEAFAULT_TEMPLATE) ⇒ Object
- #gen(yaml_file, template_name = DEAFAULT_TEMPLATE) ⇒ Object
-
#initialize(*args) ⇒ App
constructor
A new instance of App.
- #json(yaml_file, with_adjust = "true") ⇒ Object
Methods included from Utils::MyLogger
Constructor Details
Class Method Details
.add_shared_option(name, options = {}) ⇒ Object
27 28 29 30 |
# File 'lib/cli/aws-must-cli.rb', line 27 def add_shared_option(name, = {}) @shared_options = {} if @shared_options.nil? @shared_options[name] = end |
.shared_options(*option_names) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/cli/aws-must-cli.rb', line 32 def (*option_names) option_names.each do |option_name| opt = @shared_options[option_name] raise "Tried to access shared option '#{option_name}' but it was not previously defined" if opt.nil? option option_name, opt end end |
Instance Method Details
#ddoc(pattern) ⇒ Object
139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/cli/aws-must-cli.rb', line 139 def ddoc( pattern ) @logger.info( "#{__method__} starting, options '#{}'" ) files = Dir.glob( pattern ).sort files.each do |file| @logger.debug( "#{__method__}, file '#{file}'" ) fileProvider = AwsMust::FileProvider.new( ) docu = AwsMust::Docu.new( fileProvider, ) docu.document( file ) end end |
#doc(template_name = DEAFAULT_TEMPLATE) ⇒ Object
118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/cli/aws-must-cli.rb', line 118 def doc( template_name=DEAFAULT_TEMPLATE ) @logger.info( "#{__method__} starting" ) = option_adjust_common( ) app = ::AwsMust::AwsMust.new( ) app.doc( template_name ) end |