title: how to fill html file using ruby script
body: <p>I have a html file has the general design (some div's) and I need to fill this div's with some html code Using ruby script.<br>
  any suggests? </p>
  
  <p>example  </p>
  
  <p>I have page.html</p>
  
  <pre><code>&lt;html&gt;
  &lt;title&gt;html Page&lt;/title&gt;
  &lt;body&gt;
  
  &lt;div id="main"&gt;
  &lt;/div&gt;
  
  &lt;div id="side"&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and a ruby script inside it i collect some data and doing some kind of processing on it and i want to present it in a nice format**<br>
  so I want to set the div which it's id=main with some html code to be like this</p>
  
  <pre><code>&lt;html&gt;
  &lt;title&gt;html Page&lt;/title&gt;
  &lt;body&gt;
  
  &lt;div id="main"&gt;
  &lt;h1&gt;you have 30 files in games folder&lt;/h1&gt;
  &lt;/div&gt;
  
  &lt;div id="side"&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <hr>
  
  <p>** why i don't use ROR? because I don't want to build a web site I just need to build a desktop tool but it's presentation layer is html code interpreted by browser to avoid working with graphics libraries</p>
  
  <hr>
  
  <p>my problem isn't "how can I write to this html file" I can handle it.<br>
  my problem that If I want to create a table in the html file inside main div
  I will wrote the whole html code inside the ruby script to print it to the html file, is there any lib or gem that i can tell it that I want a table with 3 rows and 2 columns and it generates the html code?</p>