Class RR::CommandRunner
In: lib/rubyrep/command_runner.rb
Parent: Object

This class implements the functionality to dispatch rubyrep commands.

Methods

commands   register   run   show_version  

Public Class methods

Returns a hash of all commands registered with register.

Registers one or multiple commands. commands is a hash with

  • key: name of the command
  • value: a command hash defining the command

A command hash consists of

  • :description: short description of the command
  • :command: an object / class implementing the hash.
                Must have a method
    
                # runs a command
                # * +args+: array of command line parameters
                #           note: will not contain the command name itself.
                def run(args)
    

Dispatches commands as per given command line parameters.

  • args: array of command line parameters

Prints the version to stderr

[Validate]