W3cubDocs

/Pony

CommandHelp

[Source]

CommandHelp encapsulates the information needed to generate a user help message for a given CommandSpec, optionally with a specific command identified to print help about. Use Help.general() or Help.for_command() to create a CommandHelp instance.

class box CommandHelp

Constructors

_create

[Source]

new ref _create(
  parent': (CommandHelp box | None val),
  spec': CommandSpec box)
: CommandHelp ref^

Parameters

Returns

Public Functions

fullname

[Source]

fun box fullname()
: String val

Returns

string

[Source]

fun box string()
: String val

Returns

help_string

[Source]

Renders the help message as a String.

fun box help_string()
: String val

Returns

[Source]

Prints the help message to an OutStream.

fun box print_help(
  os: OutStream tag)
: None val

Parameters

Returns

Private Functions

_write_help

[Source]

fun box _write_help(
  w: Writer ref)
: None val

Parameters

Returns

_write_usage

[Source]

fun box _write_usage(
  w: Writer ref)
: None val

Parameters

Returns

_write_options

[Source]

fun box _write_options(
  w: Writer ref,
  options: Array[OptionSpec box] box)
: None val

Parameters

Returns

_write_commands

[Source]

fun box _write_commands(
  w: Writer ref)
: None val

Parameters

Returns

_list_commands

[Source]

fun box _list_commands(
  cs: CommandSpec box,
  cols: Array[(USize val , String val , String val)] ref,
  level: USize val)
: None val

Parameters

Returns

_write_args

[Source]

fun box _write_args(
  w: Writer ref,
  args: Array[ArgSpec val] box)
: None val

Parameters

Returns

_any_options

[Source]

fun box _any_options()
: Bool val

Returns

_all_options

[Source]

fun box _all_options()
: Array[OptionSpec box] ref

Returns

_all_options_fill

[Source]

fun box _all_options_fill(
  options: Array[OptionSpec box] ref)
: None val

Parameters

Returns

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