lib/harvestdor/indexer/resource.rb in harvestdor-indexer-2.2.0 vs lib/harvestdor/indexer/resource.rb in harvestdor-indexer-2.3.0

- old
+ new

@@ -57,10 +57,12 @@ ## # Return the items in this collection def items return [] unless collection? - return to_enum(:items) unless block_given? + + # return an enumerator, with an estimated size of the collection + return to_enum(:items) { items_druids.length } unless block_given? items_druids.each do |x| yield Harvestdor::Indexer::Resource.new(indexer, x) end end \ No newline at end of file