module Axiom::Attribute::Comparable

A mixin for attributes that have comparable objects

Public Instance Methods

asc() click to toggle source

Sort the attribute in ascending order

@example

ascending = attribute.asc

@return [Axiom::Relation::Operation::Sorted::Ascending]

@api public

# File lib/axiom/attribute/comparable.rb, line 21
def asc
  Axiom::Relation::Operation::Sorted::Ascending.new(self)
end
desc() click to toggle source

Sort the attribute in descending order

@example

descending = attribute.desc

@return [Axiom::Relation::Operation::Sorted::Descending]

@api public

# File lib/axiom/attribute/comparable.rb, line 33
def desc
  Axiom::Relation::Operation::Sorted::Descending.new(self)
end
range() click to toggle source

The range for the objects

@return [Range]

@api public

# File lib/axiom/attribute/comparable.rb, line 42
def range
  type.range
end