# File lib/mongoid/contexts/mongo.rb, line 209 def iterate(&block) return caching(&block) if cached? if block_given? execute.each { |doc| yield doc } end end