strip_heredoc v0.7.0 StripHeredoc
Strips indentation in heredocs.
For example in
usage = """
This command does such and such.
Supported options are:
-h This message
...
"""
IO.puts( strip_heredoc(usage) )
the user would see the usage message aligned against the left margin.
Technically, it looks for the least indented non-empty line in the whole string, and removes that amount of leading whitespace.
Summary
Functions
Strips indentation in heredocs