heredoc_unindent

heredoc_unindent

This gem removes common margin from indented strings, such as the ones produced by indented heredocs. In other words, it strips out leading whitespace chars at the beggining of each line, but only as much as the line with the smallest margin. It is acknowledged that many strings defined by heredocs are just code and fact is that most parsers are insensitive to indentation. If, however, the strings are to be used otherwise, be it for printing or testing, the extra indentation will probably be an issue and hence this gem.

Rubygem heredoc_unindent

Total Downloads
21048
Releases
10
Current Version
1.1.2
Released
2011-02-07 02:00:00 UTC
First Release
2011-01-17 02:00:00 UTC

Github adrianomitre/heredoc_unindent

Watchers
15
Forks
2
Development activity
Inactive
Last commit
2011-02-07 20:48:06 UTC
First commit
Top contributors
Contributors
1
Issues

Resources

There are no resources yet, be the first to submit one!

Comments

There are no comments yet, be the first to write one!

Post a comment

Markdown supported
or
×

In order to continue, you must be signed in using your Github account.

If you're signing in using this account for the first time Github will ask for your permission to give access to your public user data to the Ruby Toolbox.

Although the Github Authorization page does not mention it, the request includes read-only access to your verified email address (user:email OAuth scope). This is neccessary so there's a way to notify you about comments, information about your accepted project edits and the like. You can review your notification settings on your account page once you're signed in.