class

Cling::Formatter

Inherits Reference < Object

Generates a formatted help template for command components.

Constructors

new(options : Options = Options.new)
Source

Instance methods

format_arguments(command : Command, io : IO) : Nil

Formats the arguments of the command into the given IO.

Source
format_commands(command : Command, io : IO) : Nil

Formats the command information including subcommands into the given IO. By default, this does not include hidden commands, but you can override this if you wish.

Source
format_description(command : Command, io : IO) : Nil

Formats the description of a command into the given IO.

Source
format_header(command : Command, io : IO) : Nil

Formats the header of a command into the given IO.

Source
format_options(command : Command, io : IO) : Nil

Formats the options of the command into the given IO.

Source
format_usage(command : Command, io : IO) : Nil

Formats the usage strings of a command into the given IO.

Source
generate(command : Command, io : IO) : Nil

Generates a help template for the specified command. This will attempt to fill fields that have not been set in the command, for example, command usage strings. Values that are not set, such as arguments and options, will not be written to the IO.

Writes to the IO and returns nothing.

Source
generate(command : Command) : String

Generates a help template for the specified command. This will attempt to fill fields that have not been set in the command, for example, command usage strings. Values that are not set, such as arguments and options, will not be written to the IO.

Source

Nested types