class Cling::Formatter
- Cling::Formatter
- Reference
- Object
Overview
Generates a formatted help template for command components.
Defined in:
cling/formatter.crConstructors
Instance Method Summary
-
#format_arguments(command : Command, io : IO) : Nil
Formats the arguments of the command into the given IO.
-
#format_commands(command : Command, io : IO) : Nil
Formats the command information including subcommands into the given IO.
-
#format_description(command : Command, io : IO) : Nil
Formats the description of a command into the given IO.
-
#format_footer(command : Command, io : IO) : Nil
Formats the footer of the command into the given IO.
-
#format_header(command : Command, io : IO) : Nil
Formats the header of a command into the given IO.
-
#format_options(command : Command, io : IO) : Nil
Formats the options of the command into the given IO.
-
#format_usage(command : Command, io : IO) : Nil
Formats the usage strings of a command into the given IO.
-
#generate(command : Command, io : IO) : Nil
Generates a help template for the specified command.
-
#generate(command : Command) : String
Generates a help template for the specified command.
Constructor Detail
Instance Method Detail
Formats the arguments of the command into the given IO.
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.
Formats the description of a command into the given IO.
Formats the header of a command into the given IO.
Formats the options of the command into the given IO.
Formats the usage strings of a command into the given IO.
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.
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.