Parent

Methods

Class/Module Index [+]

Quicksearch

Webgen::CLI::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.

Attributes

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

Public Instance Methods

create_website() click to toggle source

Utility method for sub-commands to create the correct Webgen::Website object.

# File lib/webgen/cli.rb, line 107
def create_website
  if !defined?(@website)
    @website = Webgen::Website.new(@directory) do |config|
      config['logger.mask'] = @log_filter
    end
    @website.logger.level = @log_level
    @website.logger.verbosity = @verbosity
  end
  @website
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.