Module: Sprout::Executable

Includes:
RubyFeature
Included in:
Base
Defined in:
sprout/lib/sprout/executable.rb,
sprout/lib/sprout/executable/url.rb,
sprout/lib/sprout/executable/path.rb,
sprout/lib/sprout/executable/base.rb,
sprout/lib/sprout/executable/urls.rb,
sprout/lib/sprout/executable/paths.rb,
sprout/lib/sprout/executable/param.rb,
sprout/lib/sprout/executable/files.rb,
sprout/lib/sprout/executable/number.rb,
sprout/lib/sprout/executable/session.rb,
sprout/lib/sprout/executable/boolean.rb,
sprout/lib/sprout/executable/strings.rb,
sprout/lib/sprout/executable/file_param.rb,
sprout/lib/sprout/executable/string_param.rb,
sprout/lib/sprout/executable/collection_param.rb,
sprout/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