class Cling::Parser::Result

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.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(kind : Kind, key : String | Nil = nil, value : String | Nil = nil, *, string : Bool = false) #

[View source]

Instance Method Detail

def key : String | Nil #

[View source]
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.


[View source]
def key=(key : String | Nil) #

[View source]
def kind : Kind #

[View source]
def kind=(kind : Kind) #

[View source]
def string? : Bool #

[View source]
def value : String | Nil #

[View source]
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.


[View source]
def value=(value : String | Nil) #

[View source]