Module: Sprout::Executable

Includes:
RubyFeature
Included in:
Base
Defined in:
lib/sprout/executable.rb,
lib/sprout/executable/url.rb,
lib/sprout/executable/urls.rb,
lib/sprout/executable/path.rb,
lib/sprout/executable/base.rb,
lib/sprout/executable/files.rb,
lib/sprout/executable/param.rb,
lib/sprout/executable/paths.rb,
lib/sprout/executable/number.rb,
lib/sprout/executable/boolean.rb,
lib/sprout/executable/strings.rb,
lib/sprout/executable/session.rb,
lib/sprout/executable/file_param.rb,
lib/sprout/executable/string_param.rb,
lib/sprout/executable/collection_param.rb,
lib/sprout/executable/parameter_factory.rb

Overview

The Sprout::Executable module exposes a Domain Specific Language for describing Command Line Interface (CLI) applications.

This module can be included by any class, and depending on how that class is used, one can either parse command line arguments into meaningful, structured data, or delegate ruby code and configuration to an existing, external command line process.

Following is an example of how one could define an executable Ruby application using this module:

:include: ../../test/fixtures/examples/echo_inputs.rb

Defined Under Namespace

Modules: CollectionParam Classes: Base, Boolean, FileParam, Files, Number, Param, ParameterFactory, Path, Paths, Session, StringParam, Strings, Url, Urls

Constant Summary

DEFAULT_FILE_EXPRESSION =
'/**/**/*'
DEFAULT_PREFIX =
'--'
DEFAULT_SHORT_PREFIX =
'-'

Method Summary

Methods included from Concern

#append_features, extended, #included