module Opts

Direct including types

Defined in:

opts/error.cr
opts/macro.cr
opts/opts.cr

Constant Summary

ARGS = ""
PROGRAM = ("#{PROGRAM_NAME}".split("/")).last
USAGE = "{{version}}\n\nUsage: {{program}} {{args}}\n\nOptions:\n{{options}}"
VERSION = (Shard.git_description.split(/\s+/, 2)).last

Instance Method Summary

Macro Summary

Instance Method Detail

def args : Array(String) #

[View source]
def argv : Array(String) #

[View source]
def argv=(argv : Array(String)) #

[View source]
def new_option_parser : OptionParser #

[View source]
def on_error(err : Exception) #

[View source]
def run(argv : Array(String)) #

[View source]
abstract def run #

[app flow] step3 : main routine


[View source]
def setup(argv : Array(String)) #

[app flow] step1 : setup args


[View source]
def setup #

[app flow] step2 : setup apps


[View source]

Macro Detail

macro option(name, long, desc) #

with block works only with Reference class


[View source]
macro option(name, long, desc, default) #

[View source]
macro option(name, short, long, desc, default) #

[View source]
macro options(*names) #

[View source]