Class UserChoices::Command
In: lib/user-choices/command.rb
Parent: Object

A template class. Subclasses describe all the choices a user may make to affect the execution of the command, and the sources for those choices (such as the command line).

Methods

Attributes

user_choices  [R] 

Public Class methods

Public Instance methods

Add choices to the ChoicesBuilder. A choice is a symbol that ends up in the @user_choices hash. It may have a :default value and a :type, as well as an OptionParser-style description of command-line arguments.

Must be defined in a subclass.

Add sources such as EnvironmentSource, XmlConfigFileSource, and CommandLineSource to the ChoicesBuilder.

Must be defined in a subclass.

Execute the command, using @user_choices for parameterization.

Must be defined in a subclass.

After choices from all sources are collected into @user_choices, this method is called to do any postprocessing. Does nothing unless overridden.

[Validate]