Class Nanoc::CLI::CommandRunner
In: lib/nanoc/cli/command_runner.rb
Parent: ::Cri::CommandRunner

A command runner subclass for nanoc commands that adds nanoc-specific convenience methods and error handling.

Methods

call   call   debug?   is_in_site_dir?   load_site   require_site   set_vcs   site   stack  

Public Class methods

Public Instance methods

@return [Boolean] true if the current working directory is a nanoc site

  directory, false otherwise

Asserts that the current working directory contains a site (just like {require_site}) and loads the site into memory.

@return [void]

Asserts that the current working directory contains a site ({Nanoc::Site} instance). If no site is present, prints an error message and exits.

@return [void]

Gets the site ({Nanoc::Site} instance) in the current directory and loads its data.

@return [Nanoc::Site] The site in the current working directory

Protected Instance methods

@return [Boolean] true if debug output is enabled, false if not

@see Nanoc::CLI.debug?

Sets the data source‘s VCS to the VCS with the given name. Does nothing when the site‘s data source does not support VCSes (i.e. does not implement vcs=).

@param [String] vcs_name The name of the VCS that should be used

@return [void]

@return [Array] The compilation stack.

[Validate]