enum

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

Inherits Enum / Comparable / Value / Object

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.

Constants

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 methods

is_array?

Returns true if this enum value contains IS_ARRAY

Source
none?
Source
optional?

Returns true if this enum value contains OPTIONAL

Source
required?

Returns true if this enum value contains REQUIRED

Source