abstract class Argy::Flag

Direct Known Subclasses

Defined in:

argy/flag.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, shorthand : Char | Nil, usage : String) #

[View source]

Instance Method Detail

def changed : Bool #

[View source]
def changed=(changed : Bool) #

[View source]
def name : String #

[View source]
abstract def reset! : Nil #

Reset the flag to its declared default and clear changed-state.


[View source]
abstract def set_from_string(raw : String) : Nil #

Set the flag value from a raw string; raises InvalidFlagValueError on failure


[View source]
def shorthand : Char | Nil #

[View source]
abstract def type_label : String #

The type label shown in help (e.g. "string", "int")


[View source]
def usage : String #

[View source]
abstract def value_string : String #

Human-readable current value (used in help output)


[View source]