class Cling::Parser::Result
- Cling::Parser::Result
- Reference
- Object
Overview
The result of a parsed value from the command line. This can be a normal argument, string argument, short flag, or long flag.
Defined in:
cling/parser.crConstructors
Instance Method Summary
- #key : String | Nil
-
#key! : String
Returns the non-nil form of the result key which is the name if it is a flag, or the value if it is an argument.
- #key=(key : String | Nil)
- #kind : Kind
- #kind=(kind : Kind)
- #string? : Bool
- #value : String | Nil
-
#value! : String
Returns the non-nil form of the result value which is the explicit value if it is a flag, or the value if it is an argument.
- #value=(value : String | Nil)
Constructor Detail
def self.new(kind : Kind, key : String | Nil = nil, value : String | Nil = nil, *, string : Bool = false)
#
Instance Method Detail
def key! : String
#
Returns the non-nil form of the result key which is the name if it is a flag, or the value if it is an argument.
def value! : String
#
Returns the non-nil form of the result value which is the explicit value if it is a flag, or the value if it is an argument.