lib/picky/query/allocations.rb in picky-4.4.1 vs lib/picky/query/allocations.rb in picky-4.4.2
- old
+ new
@@ -1,12 +1,20 @@
module Picky
module Query
- # Container class for allocations.
+ # Container class for Allocation s.
#
- class Allocations # :nodoc:all
+ # This class is asked by the Results class to
+ # compile and process a query.
+ # It then asks each Allocation to process their
+ # ids and scores.
+ #
+ # It also offers convenience methods to access #ids
+ # of its Allocation s.
+ #
+ class Allocations
delegate :each,
:empty?,
:first,
:inject,
@@ -86,11 +94,14 @@
terminate_early -= 1
end
end
end
- # Same as #process! but with this added parameter:
- # * unique: If ids have already been found, do not find them anymore (if true)
+ # Same as #process! but removes duplicate ids from results.
+ #
+ # Note that in the result later on an allocation won't be
+ # included if it contains no ids (even in case they have been
+ # eliminated by the unique constraint in this method).
#
# Note: Slower than #process! especially with large offsets.
#
# TODO Remove duplicate code.
#
\ No newline at end of file