Class: Axiom::Attribute::Numeric
- Inherits:
-
Object
- Object
- Axiom::Attribute
- Object
- Axiom::Attribute::Numeric
- Includes:
- Axiom::Aggregate::Sum::Methods, Comparable
- Defined in:
- lib/axiom/attribute/numeric.rb
Overview
Represents a Numeric value in a relation tuple
Constant Summary
Constants inherited from Axiom::Attribute
Instance Attribute Summary
Attributes inherited from Axiom::Attribute
Class Method Summary collapse
-
.type ⇒ Class<Types::Numeric>
The attribute type.
Instance Method Summary collapse
-
#initialize(_name, options = EMPTY_HASH) ⇒ undefined
constructor
private
Initialize a Numeric 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
Methods included from Axiom::Aggregate::Sum::Methods
Methods included from Function::Predicate::Equality::Methods
Methods included from Function::Predicate::Exclusion::Methods
Methods included from Function::Predicate::Inequality::Methods
Methods included from Function::Predicate::Inclusion::Methods
Methods included from Axiom::Aggregate::Count::Methods
Methods inherited from Axiom::Attribute
#call, coerce, #include?, infer_type, name_from, #optional?, #rename, #required?
Methods included from Visitable
Constructor 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 Numeric Attribute
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/axiom/attribute/numeric.rb', line 37 def initialize(_name, = EMPTY_HASH) super size = [:size] if size @type = type.new do minimum(size.first) maximum(size.last) end end end |
Class Method Details
.type ⇒ Class<Types::Numeric>
The attribute type
19 20 21 |
# File 'lib/axiom/attribute/numeric.rb', line 19 def self.type Types::Numeric end |