lib/yardstick/document_set.rb in yardstick-0.9.7 vs lib/yardstick/document_set.rb in yardstick-0.9.8

- old
+ new

@@ -1,21 +1,19 @@ # encoding: utf-8 module Yardstick - # A set of yardstick documents class DocumentSet < OrderedSet - # Measure documents using given config # # @return [Yardstick::MeasurementSet] # a collection of measurements # # @api private def measure(config) - each_with_object(MeasurementSet.new) do |document, set| + reduce(MeasurementSet.new) do |set, document| set.merge(Document.measure(document, config)) + set end end - end end