Sha256: a1936c02421b45c057db3848892f1d5476145ca1fc84df285e32e4c09fddc82e
Contents?: true
Size: 172 Bytes
Versions: 8
Compression:
Stored size: 172 Bytes
Contents
# taken from rails (will be in Ruby 1.9??) module Enumerable def index_by inject({}) do |accum, elem| accum[yield(elem)] = elem accum end end end
Version data entries
8 entries across 8 versions & 1 rubygems