Represents the possible vale types of an
Value modes can also be combined using the Enum. macro.
ACON::Input::Option::Value[:required, :is_array] which defines a required array option.
NONE = 0#
Represents a boolean flag option that will be
true if provided, otherwise
REQUIRED = 1#
Represents an option that MUST have a value if provided.
The option itself is still optional.
OPTIONAL = 2#
Represents an option that MAY have a value, but it is not a requirement.
When using the option value mode, it can be hard to distinguish between passing an option without a value and not passing it at all.
In this case you should set the default of the option to
false, instead of the default of
Then you would be able to tell it wasn't passed by the value being
false, passed without a value as
nil, and passed with a value.
In this context you will need to work with the raw
String? representation of the value due to the union of types the value could be.
IS_ARRAY = 4#
Represents an option that can be provided multiple times to produce an array of values.