Class Cri::Base
In: lib/cri/base.rb
Parent: Object

Cri::Base is the central class representing a commandline tool. It has a list of commands.

Methods

Attributes

commands  [R]  The CLI‘s list of commands (should also contain the help command)
help_command  [RW]  The CLI‘s help command (required)

Public Class methods

Creates a new instance of the commandline tool.

Public Instance methods

Adds the given command to the list of commands. Adding a command will also cause the command‘s base to be set to this instance.

Returns the command with the given name.

Returns the list of global option definitions.

Handles the given option.

Parses the given commandline arguments and executes the requested command.

Shows the help text for the given command, or shows the general help text if no command is given.

[Validate]