# File lib/mongoid/contexts/enumerable/sort.rb, line 22 def <=>(other) cmp = compare(value, other.value) ascending? ? cmp : cmp * -1 end