Sha256: 806d63e53dbb741c339c21d9d17a81dda580f10babc1b01a3d0e223636e3920d
Contents?: true
Size: 189 Bytes
Versions: 8
Compression:
Stored size: 189 Bytes
Contents
#taken from rails, will be in Ruby 1.9 module Enumerable def group_by inject({}) do |groups, element| (groups[yield(element)] ||= []) << element groups end end end
Version data entries
8 entries across 8 versions & 1 rubygems