struct

Shell::AutoComplete::Parser::FlagSpec

Inherits Struct < Value < Object

A flag spec matches either by name — the usual case, where names holds every spelling the flag answers to — or by shape, where pattern matches a whole token that is the flag and its value at once (-20, +50). A pattern spec carries no names; capture group 1 of its pattern, or the whole match when it has no groups, is the value handed to the flag.

Constructors

new(canonical : String, names : Array(String), takes_value : Bool, bool_value : Bool | Nil, forced_value : String | Nil = nil, pattern : Regex | Nil = nil)
Source

Instance methods

bool_value
canonical
clone
Source
copy_with(canonical _canonical = @canonical, names _names = @names, takes_value _takes_value = @takes_value, bool_value _bool_value = @bool_value, forced_value _forced_value = @forced_value, pattern _pattern = @pattern)
Source
forced_value
names
pattern
takes_value