# File lib/active_support/core_ext/enumerable.rb, line 92 def index_by inject({}) do |accum, elem| accum[yield(elem)] = elem accum end end