abstract class Cli::OptionModel
- Cli::OptionModel
- Optarg::Model
- Reference
- Object
Overview
Inherits the Optarg::Model class for parsing command-line arguments.
Defined in:
lib/option_model.crlib/option_model/dsl.cr
Instance Method Summary
-
#command
Returns a related command instance.
Macro Summary
-
arg(name, stop = nil, default = nil, required = nil, desc = nil, any_of = nil, complete = nil, &block)
Defines a String argument model item.
-
arg_array(names, default = nil, min = nil, desc = nil, var = nil, any_item_of = nil, complete = nil, &block)
Defines an Array(String) argument model item.
-
array(names, default = nil, min = nil, desc = nil, var = nil, any_item_of = nil, complete = nil, &block)
Defines an Array(String) option model item.
-
bool(names, stop = nil, default = nil, not = nil, desc = nil, &block)
Defines a Bool option model item.
-
help(names = nil, desc = nil)
Defines a handler model item for printing a help message.
-
on(names, desc = nil, &block)
Defines a handler model item.
-
string(names, stop = nil, default = nil, required = nil, desc = nil, var = nil, any_of = nil, complete = nil, &block)
Defines a String option model item.
-
unknown(desc = nil, &block)
Defines an unknown model item.
-
version(names = nil, desc = nil)
Defines a handler model item for printing a version string.
Instance Method Detail
Macro Detail
Defines a String argument model item.
Defines an Array(String) argument model item.
Defines an Array(String) option model item.
Defines a Bool option model item.
Defines a handler model item for printing a help message.
Defines a String option model item.
Defines a handler model item for printing a version string.