def flatten( ary )
      return ary.first.dup if ary.length == 1

      hash = {}
      ary.each { |h| hash.update h }
      return hash
    end
def flatten( ary )
      return ary.first.dup if ary.length == 1

      hash = {}
      ary.each { |h| hash.update h }
      return hash
    end
Given an Array of Hash objects, flatten all the key/value pairs from the
 Hash objects in the ary into a single Hash. The flattening occurs left
 to right. So that the key/value in the very last Hash overrides any
 other key from the previous Hash objcts.

 ary - An Array of Hash objects.

 Returns a Hash.