Class: Axiom::Attribute::String
- Inherits:
-
Object
- Object
- Axiom::Attribute
- Object
- Axiom::Attribute::String
- Defined in:
- lib/axiom/attribute/string.rb
Overview
Represents a String 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::String>
The attribute type.
Instance Method Summary collapse
-
#initialize(_name, options = EMPTY_HASH) ⇒ undefined
constructor
private
Initialize a String 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 Function::Predicate::Match::Methods
Methods included from Function::Predicate::NoMatch::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 String Attribute
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/axiom/attribute/string.rb', line 40 def initialize(_name, = EMPTY_HASH) super min, max = .values_at(:minimum_length, :maximum_length) if min || max @type = type.new do minimum_length(min) if min maximum_length(max) if max end end end |
Class Method Details
.type ⇒ Class<Types::String>
The attribute type
20 21 22 |
# File 'lib/axiom/attribute/string.rb', line 20 def self.type Types::String end |