class CliGen::Flag(T)

Defined in:

cligen/flag.cr

Constructors

Instance Method Summary

Instance methods inherited from class CliGen::BaseFlag

check! : Nil check!, delimiter : String delimiter, description : String description, env_var : String | Nil env_var, long : String long, long_key : String long_key, matches?(token : String) : Bool matches?, meta : FlagMeta meta, raw_value : String | Nil raw_value, satisfied? : Bool satisfied?, short : String | Nil short, validate! : Nil validate!, var : String var

Constructor methods inherited from class CliGen::BaseFlag

new(var : String, short : String | Nil, long : String, env_var : String | Nil, description : String, delimiter : String, meta : FlagMeta) new

Constructor Detail

def self.new(var : String, short : String | Nil, long : String, env_var : String | Nil, description : String, delimiter : String = ",", default : T | Nil = nil, options : Array(T) | Nil = nil, validate : T -> Bool | Nil = nil, on_match : Proc(T, Nil) | Nil = nil, format : ::Regex | Nil = nil) #

Instance Method Detail

def check! : Nil #

def process(argv : Array(Arg) = [] of Arg) : Nil #

def raw_value : String | Nil #

def requires_arg? : Bool #

def satisfied? : Bool #

def validate!(v : T | Nil = nil) : Nil #

def value! : T #