Module: Axiom::Attribute::Comparable

Overview

A mixin for attributes that have comparable values

Instance Method Summary collapse

Methods included from Function::Predicate::GreaterThan::Methods

#gt

Methods included from Function::Predicate::GreaterThanOrEqualTo::Methods

#gte

Methods included from Function::Predicate::LessThan::Methods

#lt

Methods included from Function::Predicate::LessThanOrEqualTo::Methods

#lte

Methods included from Axiom::Aggregate::Minimum::Methods

#minimum

Methods included from Axiom::Aliasable

#inheritable_alias

Methods included from Axiom::Aggregate::Maximum::Methods

#maximum

Methods included from Axiom::Aggregate::Mean::Methods

#mean

Methods included from Axiom::Aggregate::Variance::Methods

#variance

Methods included from Axiom::Aggregate::StandardDeviation::Methods

#standard_deviation

Instance Method Details

#ascRelation::Operation::Order::Ascending

Sort the attribute in ascending order

Examples:

ascending = attribute.asc

Returns:



26
27
28
# File 'lib/axiom/attribute/comparable.rb', line 26

def asc
  Relation::Operation::Order::Ascending.new(self)
end

#descRelation::Operation::Order::Descending

Sort the attribute in descending order

Examples:

descending = attribute.desc

Returns:



38
39
40
# File 'lib/axiom/attribute/comparable.rb', line 38

def desc
  Relation::Operation::Order::Descending.new(self)
end