Cuprum::Cli

A command-line utility powered by Cuprum that provides tools and utilities for defining command-line tools.

Class: Cuprum::Cli::Integrations::Thor::ArgumentsParser

Parent Namespace
Cuprum::Cli::Integrations::Thor
Defined In
lib/cuprum/cli/integrations/thor/arguments_parser.rb

Table Of Contents

Overview

Utility for parsing command-line arguments captured by Thor tasks.

Any unrecognized command line flags or options are appended as-is to the arguments array by Thor. Therefore, to handle cases such as variadic options where flags or options cannot be pre-parsed by Thor, we need an additional parsing step to pull any remaining flags or options out of the arguments.

This parser supports the following formats:

The following formats are specifically not supported:

In addition, parsed option values are coerced into their most likely intended types.

Back To Top

Instance Methods

#call(*inputs) => Array<Array<String>, Hash{Symbol => Object}>

Parses the given argument inputs into arguments and options.

Parameters

Returns

Back To Top


Back to Documentation | Reference | Cuprum | Cuprum::Cli | Cuprum::Cli::Integrations | Cuprum::Cli::Integrations::Thor