Module: Axiom::Attribute::ValueComparable
- Includes:
- Axiom::Aggregate::Maximum::Methods, Axiom::Aggregate::Mean::Methods, Axiom::Aggregate::Minimum::Methods, Axiom::Aggregate::StandardDeviation::Methods, Axiom::Aggregate::Variance::Methods, Comparable
- Defined in:
- lib/axiom/attribute/value_comparable.rb
Overview
A mixin for attributes that have comparable values
Instance Method Summary collapse
-
#initialize(_name, options = EMPTY_HASH) ⇒ undefined
private
Initialize a value comparable attribute.
Methods included from Comparable
Methods included from Function::Predicate::GreaterThan::Methods
Methods included from Function::Predicate::GreaterThanOrEqualTo::Methods
Methods included from Function::Predicate::LessThan::Methods
Methods included from Function::Predicate::LessThanOrEqualTo::Methods
Methods included from Axiom::Aggregate::Minimum::Methods
Methods included from Axiom::Aliasable
Methods included from Axiom::Aggregate::Maximum::Methods
Methods included from Axiom::Aggregate::Mean::Methods
Methods included from Axiom::Aggregate::Variance::Methods
Methods included from Axiom::Aggregate::StandardDeviation::Methods
Instance Method Details
#initialize(_name, options = EMPTY_HASH) ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize a value comparable attribute
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/axiom/attribute/value_comparable.rb', line 29 def initialize(_name, = EMPTY_HASH) super size = [:size] if size @type = type.new do minimum(size.first) maximum(size.last) end end end |