class Webgen::CLI::CommandParser

This is the command parser class used for handling the webgen command line interface.

After creating an instance, the parse method can be used for parsing the command line arguments and executing the requested command.

Attributes

directory[R]

The website directory. Default: the value of the WEBGEN_WEBSITE environment variable or the current working directory.

Note: Only available after the website method has been called (which is always the case when a command is executed).

log_level[R]

The log level. Default: Logger::INFO

verbose[R]

Specifies whether verbose output should be used.

Public Class Methods

new()

Create a new CommandParser class.

Calls superclass method

Public Instance Methods

parse(argv = ARGV)

Parse the command line arguments.

Once the website directory information is gathered, the Webgen::Website is initialized to allow additional CLI commands to be added by extensions.

Calls superclass method
website(force_new = false)

Utility method for getting the Webgen::Website object.

Returns a new website object (not an already created one) if force_new is set to true.