module Enumerable

Public Instance Methods

group_count() { |u| ... } click to toggle source
# File lib/bad_ass_extensions/enumerable.rb, line 2
def group_count
  self.group_by{|u| yield(u)}.inject({}){|hash, group| hash[group[0]]= group[1].length;hash }
end