Module: Toys

Defined in:
lib/toys-core.rb,
lib/toys/cli.rb,
lib/toys/core.rb,
lib/toys/flag.rb,
lib/toys/tool.rb,
lib/toys/mixin.rb,
lib/toys/compat.rb,
lib/toys/errors.rb,
lib/toys/loader.rb,
lib/toys/context.rb,
lib/toys/acceptor.rb,
lib/toys/dsl/flag.rb,
lib/toys/dsl/tool.rb,
lib/toys/template.rb,
lib/toys/arg_parser.rb,
lib/toys/completion.rb,
lib/toys/flag_group.rb,
lib/toys/middleware.rb,
lib/toys/utils/exec.rb,
lib/toys/utils/gems.rb,
lib/toys/source_info.rb,
lib/toys/module_lookup.rb,
lib/toys/dsl/flag_group.rb,
lib/toys/positional_arg.rb,
lib/toys/utils/terminal.rb,
lib/toys/utils/help_text.rb,
lib/toys/wrappable_string.rb,
lib/toys/dsl/positional_arg.rb,
lib/toys/standard_mixins/exec.rb,
lib/toys/standard_mixins/gems.rb,
lib/toys/standard_mixins/bundler.rb,
lib/toys/utils/completion_engine.rb,
lib/toys/standard_mixins/highline.rb,
lib/toys/standard_mixins/terminal.rb,
lib/toys/standard_mixins/fileutils.rb,
lib/toys/standard_middleware/show_help.rb,
lib/toys/standard_middleware/apply_config.rb,
lib/toys/standard_middleware/show_root_version.rb,
lib/toys/standard_middleware/add_verbosity_flags.rb,
lib/toys/standard_middleware/handle_usage_errors.rb,
lib/toys/standard_middleware/set_default_descriptions.rb

Overview

Toys is a configurable command line tool. Write commands in config files using a simple DSL, and Toys will provide the command line executable and take care of all the details such as argument parsing, online help, and error reporting. Toys is designed for software developers, IT professionals, and other power users who want to write and organize scripts to automate their workflows. It can also be used as a Rake replacement, providing a more natural command line interface for your project's build tasks.

This module contains the command line framework underlying Toys. It can be used to create command line executables using the Toys DSL and classes.

Defined Under Namespace

Modules: Acceptor, Completion, Core, DSL, FlagGroup, InputFile, Middleware, Mixin, StandardMiddleware, StandardMixins, Template, Utils Classes: ArgParser, ArgParsingError, CLI, Context, ContextualError, Flag, Loader, LoaderError, ModuleLookup, NotRunnableError, PositionalArg, SourceInfo, Tool, ToolDefinitionError, WrappableString

Class Attribute Summary collapse

Class Attribute Details

.executable_pathString?

Path to the executable. This can, for example, be invoked to run a subtool in a clean environment.

Returns:

  • (String)

    if there is an executable

  • (nil)

    if there is no such executable



59
60
61
# File 'lib/toys-core.rb', line 59

def executable_path
  @executable_path
end