Arg

[Source]

Arg contains a spec and an effective value for a given arg.

class val Arg

Constructors

create

[Source]

new val create(
  spec': ArgSpec val,
  value': (Bool val | String val | I64 val | 
    U64 val | F64 val | _StringSeq val))
: Arg val^

Parameters

Returns

Public Functions

spec

[Source]

fun box spec()
: ArgSpec val

Returns

bool

[Source]

Returns the arg value as a Bool, defaulting to false.

fun box bool()
: Bool val

Returns

string

[Source]

Returns the arg value as a String, defaulting to empty.

fun box string()
: String val

Returns

i64

[Source]

Returns the arg value as an I64, defaulting to 0.

fun box i64()
: I64 val

Returns

u64

[Source]

Returns the arg value as an U64, defaulting to 0.

fun box u64()
: U64 val

Returns

f64

[Source]

Returns the arg value as an F64, defaulting to 0.0.

fun box f64()
: F64 val

Returns

string_seq

[Source]

Returns the arg value as a ReadSeq[String], defaulting to empty.

fun box string_seq()
: ReadSeq[String val] val

Returns

deb_string

[Source]

fun box deb_string()
: String val

Returns

© 2016-2020, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/cli-Arg