title: Create Hash iterating an array of objects
body: <p>I have an object that has attributes <code>name</code> and <code>data</code>, among others. I want to create a hash that uses the name as the key and the data (which is an array) as the value. I can't figure out how to reduce the code below using <code>map</code>. Is it possible?</p>
  
  <pre><code>def fc_hash
    fcs = Hash.new
    self.forecasts.each do |fc|
      fcs[fc.name] = fc.data
    end
    fcs
  end
  </code></pre>