title: Including one erb file into another
body: <p>I'm writing a command-line tool that will ultimately output an HTML report. The tool is written in Ruby. (I am not using Rails). I'm trying to keep the logic of the application in one set of files, and the HTML templates (the .erb files) in another set.</p>
  
  <p>I'm having a really annoying problem though: I can't successfully include one .erb file into another.</p>
  
  <p>To be specific, I'm trying to do something like this (in pseudo-code):</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;style type='text/css'&gt;
      [include a stylesheet here]
      [and another one here]
    &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;p&gt;The rest of my document follows...
  </code></pre>
  
  <p>That example snippet is <em>itself</em> an erb file, which is being invoked from within the application logic.</p>
  
  <p>I'm doing things this way so I can keep my stylesheets out of the main template to make it easier/cleaner to maintain the application. The end product (the report), though, needs to be a single, stand-alone HTML file which has no dependencies, and thus, I want to inline those stylesheets into the document head when the report is generated.</p>
  
  <p>This seems like this should be easy, but I've been banging my head against a wall (and Googling, and RTMF'ing) for the last hour, and I'm not having any luck at all.</p>
  
  <p>How is this supposed to be done? Thanks.</p>