W3cubDocs

/Pony

Command

[Source]

Command contains all of the information describing a command with its spec and effective options and arguments, ready to use.

class box Command

Constructors

_create

[Source]

new ref _create(
  spec': CommandSpec box,
  fullname': String val,
  options': HashMap[String val, Option val, HashEq[String val] val] box,
  args': HashMap[String val, Arg val, HashEq[String val] val] box)
: Command ref^

Parameters

Returns

Public Functions

string

[Source]

Returns a representational string for this command.

fun box string()
: String iso^

Returns

spec

[Source]

Returns the spec for this command.

fun box spec()
: CommandSpec box

Returns

fullname

[Source]

Returns the full name of this command, with its parents prefixed.

fun box fullname()
: String val

Returns

option

[Source]

Returns the Option by name, defaulting to a fake Option if unknown.

fun box option(
  name: String val)
: Option val

Parameters

Returns

arg

[Source]

Returns the Arg by name, defaulting to a fake Arg if unknown.

fun box arg(
  name: String val)
: Arg val

Parameters

Returns

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