title: Parsing a structured text file in Ruby
body: <p>How can i easily parse a document which has this structure</p>
  
  <pre><code>description
  some line of text
  another line of text
  more lines of text
  
  quality
  3 47 88 4 4 4  4
  
  text: type 1
  stats some funny stats
  
  description
  some line of text2
  another line of text2
  more lines of text2
  
  quality
  1 2  4 6 7
  
  text: type 1
  stats some funny stats
  
  .
  .
  .
  </code></pre>
  
  <p>Ideally i would want an array of hash structures where each hash represents a 'section' of the document and probably should look like this:</p>
  
  <p>{:description => "some line of text
                   another line of text
                   more lines of text",
  :quality => "3 47 88 4 4 4  4",
  :text =>type 1,
  :stats => "some funny stats"}</p>