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)
SourceInstance methods
render_option(io, option)
Sourcerender_option_list(io, options)
Sourcerender_options(io)
Sourceto_s(io)
Source