Sha256: cf4552a0e2ef78a8d3c295beff77d20ee38d72660801dc362364c4d6ea0745c7
Contents?: true
Size: 164 Bytes
Versions: 8
Compression:
Stored size: 164 Bytes
Contents
class Array def hashify_with_counts hash = {} self.each do |item| hash[item] = hash.has_key?(item) ? (hash[item] + 1) : 1 end hash end end
Version data entries
8 entries across 8 versions & 1 rubygems