class

Toka::HelpPageRenderer

Inherits Reference / Object

Renderer for a OptionDescriptor, to be shown on a terminal.

By default, the user of your program can access this using the defualt arguments "--help" and "-h". You can disable this if you want, see Toka.mapping.

Manual invocation

To manually render the help page, simply use #to_s:

help = Toka::HelpPageRenderer.new(YourOptionClass)
puts help.to_s

Constants

BASE_INDENT = (OPTION_INDENT.size + 4) + 2
MAX_ALIGN = 20
OPTION_INDENT = " "

Constructors

new(options, colors : Bool = true)
Source

Instance methods

render_option(io, option)
Source
render_option_list(io, options)
Source
render_options(io)
Source
to_s(io)
Source