| Class | Webgen::CLI::CommandParser |
| In: |
lib/webgen/cli.rb
|
| Parent: | CmdParse::CommandParser |
This is the command parser class used for handling the webgen command line interface. After creating an instance, the inherited parse method can be used for parsing the command line arguments and executing the requested command.
| directory | [R] | The website directory. Default: the current working directory. |
| log_level | [R] | The log level. Default: Logger::WARN |
| verbosity | [R] | The verbosity level. Default: :normal |
Utility method for sub-commands to create the correct Webgen::Website object.
# File lib/webgen/cli.rb, line 108
108: def create_website
109: if !defined?(@website)
110: @website = Webgen::Website.new(@directory) do |config|
111: config['logger.mask'] = @log_filter
112: end
113: @website.logger.level = @log_level
114: @website.logger.verbosity = @verbosity
115: end
116: @website
117: end