title: Clean way to build long strings in Ruby
body: <p>When writing Ruby (client scripts) I see three ways to build longer strings, including line-endings, all of which "smell" kind of ugly to me.</p>
  
  <p>Are there any cleaner and nicer ways?</p>
  
  <h2>The variable-incrementing.</h2>
  
  <pre><code>if render_quote?
    quote =  "Now that there is the Tec-9, a crappy spray gun from South Miami."
    quote += "This gun is advertised as the most popular gun in American crime. Do you believe that shit?"
    quote += "It actually says that in the little book that comes with it: the most popular gun in American crime."
    quote += "Like they're actually proud of that shit."
    puts quote
  end
  </code></pre>
  
  <h2>Heredocs (and unclosed quotes).</h2>
  
  <pre><code>if render_quote?
    quote =&lt;&lt;EOS
  Now that there is the Tec-9, a crappy spray gun from South Miami.
  This gun is advertised as the most popular gun in American crime. Do you believe that shit?
  It actually says that in the little book that comes with it: the most popular gun in American crime.
  Like they're actually proud of that shit.
  EOS
  
    puts quote
  end
  </code></pre>
  
  <p>Or, by simply not adding a closing tag:</p>
  
  <pre><code>if render_quote?
    quote = "Now that there is the Tec-9, a crappy spray gun from South Miami.
  This gun is advertised as the most popular gun in American crime. Do you believe that shit?
  It actually says that in the little book that comes with it: the most popular gun in American crime.
  Like they're actually proud of that shit."
  
    puts quote
  end
  </code></pre>
  
  <p>Or, optionally, <a href="https://stackoverflow.com/questions/3772864/how-do-i-remove-leading-whitespace-chars-from-ruby-heredoc">with a gsub to fix the identation</a>-issues (yuk!?).</p>
  
  <h2>Concatenating.</h2>
  
  <pre><code>if render_quote?
    quote =  "Now that there is the Tec-9, a crappy spray gun from South Miami."
    quote += "This gun is advertised as the most popular gun in American crime. Do you believe that shit?"
    quote += "It actually says that in the little book that comes with it: the most popular gun in American crime."
    quote += "Like they're actually proud of that shit."
    puts quote
  end
  </code></pre>
  
  <p>( quote from <a href="http://slipsum.com/" rel="nofollow noreferrer">Samuel L. Ipsum</a> )</p>
  
  <p>I am aware that having such strings (i.e. view-logic) trough my scripts is a smell in itself, but don't know of a pattern (other then po-files or so) to clean this up.</p>