enum Athena::Console::Input::Argument::Mode

Overview

Represents the possible modes of an ACON::Input::Argument, that describe the "type" of the argument.

Modes can also be combined using the Enum.[] macro. For example, ACON::Input::Argument::Mode[:required, :is_array] which defines a required array argument.

Defined in:

input/argument.cr

Enum Members

REQUIRED = 1

Represents a required argument that MUST be provided. Otherwise the command will not run.

OPTIONAL = 2

Represents an optional argument that could be omitted.

IS_ARRAY = 4

Represents an argument that accepts a variable amount of values. Arguments of this type must be last.

None = 0
All = 7

Instance Method Summary

Instance Method Detail

def is_array? #

[View source]
def none? #

[View source]
def optional? #

[View source]
def required? #

[View source]