class
Opal::CLI::Option
- Opal::CLI::Option
- Reference
- Object
Overview
Represents a command-line flag or option.
Defined in:
opal/cli/option.crConstructors
Instance Method Summary
- #choices : Array(String) | Nil
- #default : OptionValue
- #description : String
- #env_var : String | Nil
- #flag? : Bool
-
#formatted_flag : String
Formatted flag representation for help screens (e.g.
- #global? : Bool
- #long : String
- #name : Symbol
- #required? : Bool
- #short : String | Nil
- #type : Symbol
Constructor Detail
def self.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)
#
Instance Method Detail
def formatted_flag : String
#
Formatted flag representation for help screens (e.g. "-e, --entry=DIR")