# File lib/facet/enumerable/partition_by.rb, line 19 def partition_by result = {} self.each do |e| value = yield e (result[value] ||= []) << e end result end