bbatsov/ruby-style-guide — Issue #72: Heredocs
Author: calebthompson
Created: 2012-02-14 20:13:08+00:00
State: open

We should add a guide for the use of heredocs. Probably worth adding the whitespace-stripping and hyphen to ignore whitespace before the END.

variable << -END.gsub(/^\s+/, '')
I am a
very long
string (but not really)
end
#=> "I am a\nvery long\nstring (but not really)