Module: TTY::Option

Defined in:
lib/tty/option.rb,
lib/tty/option/dsl.rb,
lib/tty/option/const.rb,
lib/tty/option/usage.rb,
lib/tty/option/errors.rb,
lib/tty/option/params.rb,
lib/tty/option/parser.rb,
lib/tty/option/result.rb,
lib/tty/option/section.rb,
lib/tty/option/version.rb,
lib/tty/option/deep_dup.rb,
lib/tty/option/pipeline.rb,
lib/tty/option/sections.rb,
lib/tty/option/converter.rb,
lib/tty/option/dsl/arity.rb,
lib/tty/option/formatter.rb,
lib/tty/option/parameter.rb,
lib/tty/option/inflection.rb,
lib/tty/option/parameters.rb,
lib/tty/option/conversions.rb,
lib/tty/option/usage_wrapper.rb,
lib/tty/option/dsl/conversion.rb,
lib/tty/option/parser/options.rb,
lib/tty/option/param_permitted.rb,
lib/tty/option/parser/keywords.rb,
lib/tty/option/aggregate_errors.rb,
lib/tty/option/error_aggregator.rb,
lib/tty/option/param_conversion.rb,
lib/tty/option/param_validation.rb,
lib/tty/option/parameter/option.rb,
lib/tty/option/parser/arguments.rb,
lib/tty/option/parameter/keyword.rb,
lib/tty/option/parameter/argument.rb,
lib/tty/option/parser/arity_check.rb,
lib/tty/option/parser/param_types.rb,
lib/tty/option/parser/environments.rb,
lib/tty/option/parameter/environment.rb,
lib/tty/option/parser/required_check.rb

Defined Under Namespace

Modules: Const, Conversions, Converter, DSL, DeepDup, Inflection, Inheritance, Interface, ParamConversion, ParamPermitted, ParamValidation, UsageWrapper Classes: AggregateErrors, ErrorAggregator, Formatter, InvalidArgument, InvalidArity, InvalidConversionArgument, MissingArgument, MissingParameter, Parameter, Parameters, Params, ParseError, Parser, Pipeline, Result, Section, Sections, UnpermittedArgument, Usage

Constant Summary collapse

Error =
Class.new(StandardError)
ConfigurationError =

Raised when a parameter invariant is invalid

Class.new(Error)
ParameterConflict =

Raised when attempting to register already registered parameter

Class.new(Error)
ConversionAlreadyDefined =

Raised when overriding already defined conversion

Class.new(Error)
ConversionError =

Raised when conversion cannot be performed

Class.new(Error)
UnsupportedConversion =

Raised when conversion type isn’t registered

Class.new(Error)
InvalidParameter =

Raised when found unrecognized parameter

Class.new(ParseError)
AmbiguousOption =

Raised when an option matches more than one parameter option

Class.new(ParseError)
VERSION =
"0.3.0"

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Enhance object with command line option parsing



15
16
17
18
19
20
21
# File 'lib/tty/option.rb', line 15

def self.included(base)
  base.module_eval do
    include Interface
    extend DSL
    extend Inheritance
  end
end