Module: Nanoc3::CLI
- Defined in:
- lib/nanoc3/cli.rb,
lib/nanoc3/cli/logger.rb,
lib/nanoc3/cli/command.rb,
lib/nanoc3/cli/error_handler.rb
Defined Under Namespace
Modules: Commands Classes: Command, ErrorHandler, Logger
Class Method Summary collapse
-
.add_command(cmd) ⇒ void
Adds the given command to the collection of available commands.
- .debug=(boolean) ⇒ void
-
.debug? ⇒ Boolean
True if debug output is enabled, false if not.
-
.run(args) ⇒ void
Invokes the nanoc commandline tool with the given arguments.
Class Method Details
.add_command(cmd) ⇒ void
This method returns an undefined value.
Adds the given command to the collection of available commands.
49 50 51 |
# File 'lib/nanoc3/cli.rb', line 49 def self.add_command(cmd) self.root_command.add_command(cmd) end |
.debug=(boolean) ⇒ void
This method returns an undefined value.
27 28 29 |
# File 'lib/nanoc3/cli.rb', line 27 def self.debug=(boolean) @debug = boolean end |
.debug? ⇒ Boolean
Returns true if debug output is enabled, false if not.
17 18 19 |
# File 'lib/nanoc3/cli.rb', line 17 def self.debug? @debug || false end |
.run(args) ⇒ void
This method returns an undefined value.
Invokes the nanoc commandline tool with the given arguments.
36 37 38 39 40 41 42 |
# File 'lib/nanoc3/cli.rb', line 36 def self.run(args) Nanoc3::CLI::ErrorHandler.handle_while do self.setup self.load_custom_commands self.root_command.run(args) end end |