Method: Enumerable#map_hash

Defined in:
lib/hobosupport/enumerable.rb

#map_hashObject



26
27
28
29
30
31
32
33
# File 'lib/hobosupport/enumerable.rb', line 26

def map_hash
  res = {}
  each do |x|
    v = yield x
    res[x] = v
  end
  res
end