lib/picky/internals/query/allocations.rb in picky-2.0.0 vs lib/picky/internals/query/allocations.rb in picky-2.1.0

- old
+ new

@@ -3,12 +3,10 @@ module Query # Container class for allocations. # class Allocations # :nodoc:all - # TODO Remove size - # delegate :each, :inject, :empty?, :size, :to => :@allocations attr_reader :total def initialize allocations = [] @allocations = allocations @@ -21,11 +19,11 @@ allocation.calculate_score weights end end # Sort the allocations. # - def sort + def sort! @allocations.sort! end # Reduces the amount of allocations to x. # @@ -114,9 +112,9 @@ def to_result @allocations.map(&:to_result).compact end end - + end - + end \ No newline at end of file