class OptionParser

Overview

These modifications to OptionParser apply text wrapping so that the command-line help is nicely formatted regardless of terminal width, and so that the formatting is visually similar to the Javascript version.

Defined in:

ext/option_parser.cr

Instance Method Summary

Instance Method Detail

def separator(message = "") #

Adds a separator, with an optional header message, that will be used to print the help. The separator is placed between the flags registered (#on) before, and the flags registered after the call.

This way, you can group the different options in an easier to read way.


[View source]
def to_s(io : IO) : Nil #

Returns all the setup options, formatted in a help message.


[View source]