Athena::Console::Input::Definition
Inherits Reference / Object
Represents a collection of ACON::Input::Arguments and ACON::Input::Options that are to be parsed from an ACON::Input::Interface.
Can be used to set the inputs of an ACON::Command via the ACON::Command#definition= method if so desired,
instead of using the dedicated methods.
Constructors
Instance methods
Adds the provided arguments to self.
Returns the ACON::Input::Argument with the provided name_or_index,
otherwise raises ACON::Exception::InvalidArgument if that argument is not defined.
Returns a ::Hash whose keys/values represent the names and default values of the ACON::Input::Arguments defined within self.
Overrides the arguments of self to those in the provided arguments array.
Overrides the arguments and options of self to those in the provided definition.
Returns true if self has an argument with the provided name_or_index.
Returns true if self has a negation with the provided name, otherwise false.
Returns true if self has an option with the provided name_or_index.
Returns true if self has a shortcut with the provided name, otherwise false.
Returns the name of the ACON::Input::Option that maps to the provided negation.
Returns the ACON::Input::Option with the provided name_or_index,
otherwise raises ACON::Exception::InvalidArgument if that option is not defined.
Returns a ::Hash whose keys/values represent the names and default values of the ACON::Input::Options defined within self.
Returns the name of the ACON::Input::Option with the provided shortcut.
Overrides the options of self to those in the provided options array.
Returns an optionally short synopsis based on the ACON::Input::Arguments and ACON::Input::Options defined within self.
The synopsis being the docopt string representing the expected options/arguments.
E.g. <name> move <x> <y> [--speed=<kn>].
ameba:disable Metrics/CyclomaticComplexity