title: One-liner to Convert Nested Hashes into dot-separated Strings in Ruby?
body: <p>What's the simplest method to convert YAML to dot-separated strings in Ruby?</p>
  
  <p>So this:</p>
  
  <pre><code>root:
    child_a: Hello
    child_b:
      nested_child_a: Nesting
      nested_child_b: Nesting Again
    child_c: K
  </code></pre>
  
  <p>To this:</p>
  
  <pre><code>{
    "ROOT.CHILD_A" =&gt; "Hello",
    "ROOT.CHILD_B.NESTED_CHILD_A" =&gt; "Nesting",
    "ROOT.CHILD_B.NESTED_CHILD_B" =&gt; "Nesting Again",
    "ROOT.CHILD_C" =&gt; "K"
  }
  </code></pre>