abstract class Cli::OptionModel

Overview

Inherits the Optarg::Model class for parsing command-line arguments.

Defined in:

lib/option_model.cr
lib/option_model/dsl.cr

Instance Method Summary

Macro Summary

Instance Method Detail

def command #

Returns a related command instance.


[View source]

Macro Detail

macro arg(name, stop = nil, default = nil, required = nil, desc = nil, any_of = nil, complete = nil) #

Defines a String argument model item.


[View source]
macro arg_array(names, default = nil, min = nil, desc = nil, var = nil, any_item_of = nil, complete = nil) #

Defines an Array(String) argument model item.


[View source]
macro array(names, default = nil, min = nil, desc = nil, var = nil, any_item_of = nil, complete = nil) #

Defines an Array(String) option model item.


[View source]
macro bool(names, stop = nil, default = nil, not = nil, desc = nil) #

Defines a Bool option model item.


[View source]
macro help(names = nil, desc = nil) #

Defines a handler model item for printing a help message.


[View source]
macro on(names, desc = nil) #

Defines a handler model item.


[View source]
macro string(names, stop = nil, default = nil, required = nil, desc = nil, var = nil, any_of = nil, complete = nil) #

Defines a String option model item.


[View source]
macro unknown(desc = nil) #

Defines an unknown model item.


[View source]
macro version(names = nil, desc = nil) #

Defines a handler model item for printing a version string.


[View source]