struct
Obsctl::CLI::FlagSpec
- Obsctl::CLI::FlagSpec
- Struct
- Value
- Object
Overview
One global option, declared once.
The argv splitter has to know whether a flag consumes the following token
before OptionParser ever sees it, because everything from the first
positional onwards belongs to the subcommand and may contain flags this
parser knows nothing about (--topics, --headless, --dry-run).
Declaring the flags as data keeps the splitter and the parser from
disagreeing about where the global section ends.
Defined in:
obsctl/cli/options.crConstructors
Instance Method Summary
- #clone
- #copy_with(long _long = @long, value _value = @value, short _short = @short, description _description = @description)
- #description : String
- #long : String
- #short : String | Nil
-
#takes_value? : Bool
True when this flag takes a separate following token.
-
#to_flag : String
Renders the flag in the form
OptionParser#onexpects. - #value : String | Nil
Constructor Detail
def self.new(long : String, value : String | Nil = nil, short : String | Nil = nil, description : String = "")
#
Instance Method Detail
def copy_with(long _long = @long, value _value = @value, short _short = @short, description _description = @description)
#