Opal::CLI::Option
Represents a command-line flag or option.
Constructors
from_spec(name : Symbol, spec : String, description : String = "", type : Symbol | Nil = nil, default : OptionValue = nil, required : Bool = false, global : Bool = false, choices : Array(String) | Nil = nil, env_var : String | Nil = nil, group : String | Nil = nil) : Option
Parses a unified spec string like "-d, --delimiter=CHAR" or "-z, --zebra"
new(name : Symbol, long : String, short : String | Nil = nil, description : String = "", type : Symbol = :string, default : OptionValue = nil, required : Bool = false, global : Bool = false, choices : Array(String) | Nil = nil, env_var : String | Nil = nil, group : String | Nil = nil, value_name : String | Nil = nil)
SourceInstance methods
choices
Sourcedefault
Sourcedescription
Sourceenv_var
Sourceflag?
Sourceglobal?
Sourcegroup
Sourcelong
Sourcename
Sourcerequired?
Sourceshort
Sourcetype
Sourcevalue_name
Source