class Argy::StringFlag

Defined in:

argy/flag.cr

Constructors

Instance Method Summary

Instance methods inherited from class Argy::Flag

changed : Bool changed, changed=(changed : Bool) changed=, name : String name, reset! : Nil reset!, set_from_string(raw : String) : Nil set_from_string, shorthand : Char | Nil shorthand, type_label : String type_label, usage : String usage, value_string : String value_string

Constructor methods inherited from class Argy::Flag

new(name : String, shorthand : Char | Nil, usage : String) new

Constructor Detail

def self.new(name, shorthand, usage, default : String = "") #

[View source]

Instance Method Detail

def default : String #

[View source]
def reset! : Nil #
Description copied from class Argy::Flag

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


[View source]
def set_from_string(raw : String) : Nil #
Description copied from class Argy::Flag

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


[View source]
def type_label : String #
Description copied from class Argy::Flag

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


[View source]
def value : String #

[View source]
def value=(value : String) #

[View source]
def value_string : String #
Description copied from class Argy::Flag

Human-readable current value (used in help output)


[View source]