title: In Ruby, can you perform string interpolation on data read from a file?
body: <p>In Ruby you can reference variables inside strings and they are interpolated at runtime.  </p>
  
  <p>For example if you declare a variable <code>foo</code> equals <code>"Ted"</code> and you declare a string <code>"Hello, #{foo}"</code> it interpolates to <code>"Hello, Ted"</code>.  </p>
  
  <p>I've not been able to figure out how to perform the magic <code>"#{}"</code> interpolation on data read from a file.  </p>
  
  <p>In pseudo code it might look something like this:</p>
  
  <pre><code>interpolated_string = File.new('myfile.txt').read.interpolate
  </code></pre>
  
  <p>But that last <code>interpolate</code> method doesn't exist.</p>