Breaking up long strings on multiple lines in Ruby without stripping newlines
You can use \
to indicate that any line of Ruby continues on the next line. This works with strings too:
string = "this is a \
string that spans lines"
puts string.inspect
will output "this is a string that spans lines"
Maybe this is what you're looking for?
string = "line #1"\
"line #2"\
"line #3"
p string # => "line #1line #2line #3"