lib/bmg/operator/page.rb in bmg-0.18.0 vs lib/bmg/operator/page.rb in bmg-0.18.1
- old
+ new
@@ -43,16 +43,10 @@
end
protected ### inspect
def comparator
- ->(t1, t2) {
- ordering.each do |(attr,direction)|
- c = t1[attr] <=> t2[attr]
- return (direction == :desc ? -c : c) unless c==0
- end
- 0
- }
+ Ordering.new(@ordering).comparator
end
def args
[ ordering, page_index, options ]
end