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, &block) #

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, &block) #

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, &block) #

Defines an Array(String) option model item.


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

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, &block) #

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, &block) #

Defines a String option model item.


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

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]