Class | Cri::Command |
In: |
lib/cri/command.rb
|
Parent: | Object |
Cri::Command represents a command that can be executed on the commandline. It is an abstract superclass for all commands.
base | [RW] |
Returns an array of strings containing the aliases for this command. Subclasses must implement this method.
Returns a string containing this command‘s complete description, which should explain what this command does and how it works in detail. Subclasses must implement this method.
Returns an array containing this command‘s option definitions. See the documentation for Cri::OptionParser for details on what option definitions look like. Subclasses may implement this method if the command has options.
Executes the command. Subclasses must implement this method (obviously… what‘s the point of a command that can‘t be run?).
options: | A hash containing the parsed commandline options. For example, ’—foo=bar’ will be converted into { :foo => ‘bar’ }. See the Cri::OptionParser documentation for details. |
arguments: | An array of strings representing the commandline arguments given to this command. |