BETAmodules.com is in beta — open to partnerships & joint ventures.Build with us

heredoc_unindent

v1.2.0RubyGems· Ruby

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.

The verdict
Abandoned. Last published 11 years ago. No recent activity — look for a maintained alternative.
No recent activity — look for a maintained alternative.
Live from the RubyGems registry · derived rules, not AI
How it scores
MaintenanceAbandoned
PopularityNiche
SecurityClean
LicensePermissive
DepsZero deps
Maintenance
Last published 11 years ago.
Popularity
66 downloads / week
Security
No known advisories for this version (OSV).
License
MIT
Dependencies
No runtime dependencies
Recent releases
  • 1.2.011 years ago
  • 1.1.215 years ago
  • 1.1.115 years ago
  • 1.1.015 years ago
  • 1.0.615 years ago
  • 1.0.515 years ago
  • 1.0.415 years ago
  • 1.0.315 years ago
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. (Ruby / RubyGems) · Modules