class Axiom::Relation::Operation::Sorted::Ascending
Represent an attribute sorted ascending
Public Class Methods
call(left, right)
click to toggle source
Compare the left and right value
@param [Comparable] left @param [Comparable] right
@return [-1]
returned if the left should be sorted before the right
@return [0]
returned if the left and right are equal
@return [1]
returned if the left should be sorted after the right
@api private
# File lib/axiom/relation/operation/sorted/direction.rb, line 141 def self.call(left, right) left <=> right || (1 if left.nil?) || (-1 if right.nil?) end
reverse()
click to toggle source
Return the reversed direction class
@return [Class<Descending>]
@api private
# File lib/axiom/relation/operation/sorted/direction.rb, line 122 def self.reverse Descending end