Class: Command::Optional

Inherits:
ArgumentDecorator show all
Defined in:
lib/command-set/arguments.rb

Overview

Most common decorator. Tags a argument as omitable. Otherwise, the interpreter will return an error to the user if they leave out an argument. Optional arguments that aren’t provided are set to nil.

Instance Attribute Summary

Attributes inherited from Argument

#name, #value

Method Summary

Methods inherited from ArgumentDecorator

decor, #decor, #decorate, decoration, #embed_argument, #initialize, register

Methods inherited from Argument

#check_present, #complete, #consume, #consume_hash, #initialize, #match_terms, #omittable?, #parse, register, #required?, #validate

Constructor Details

This class inherits a constructor from Command::ArgumentDecorator