Class Mongoid::Contexts::Enumerable::Sort
In: lib/mongoid/contexts/enumerable/sort.rb
Parent: Object

Methods

<=>   ascending?   new  

Attributes

direction  [R] 
value  [R] 

Public Class methods

Create a new sorting object. This requires a value and a sort direction of +:asc+ or +:desc+.

Public Instance methods

Compare two Sort objects against each other, taking into consideration the direction of the sorting.

Return true if the direction is +:asc+, otherwise false.

[Validate]