class CLI::Argument
- CLI::Argument
- Reference
- Object
Overview
Represents a command line argument, this can be a single value or a string value. Arguments are
parsed after the main command and any subcommands are resolved. Note that Options that have
values take priority in the resolution list, so the following example would only yield 2
arguments:
./greet --time=day Dev
# ^^^
# belongs to the flag option
Arguments should typically be defined in the Command#setup method of a command using
Command#add_argument to prevent conflicts.
Defined in:
cli/argument.crConstructors
Instance Method Summary
- #description : String | Nil
- #description=(description : String | Nil)
- #has_value=(has_value : Bool)
- #has_value? : Bool
- #name : String
- #name=(name : String)
- #required=(required : Bool)
- #required? : Bool
-
#to_s(io : IO) : Nil
:inherit:
- #value : Value | Nil
- #value=(value : Value | Nil)