Class: Axiom::Attribute::Boolean
- Inherits:
-
Object
- Object
- Axiom::Attribute
- Object
- Axiom::Attribute::Boolean
- Includes:
- Function::Connective::Conjunction::Methods, Function::Connective::Disjunction::Methods, Function::Connective::Negation::Methods
- Defined in:
- lib/axiom/attribute/boolean.rb
Overview
Represents a Boolean value in a relation tuple
Instance Attribute Summary
Attributes inherited from Axiom::Attribute
Class Method Summary collapse
-
.primitive ⇒ Class<TrueClass>
The Boolean primitive.
Instance Method Summary collapse
-
#valid_value?(value) ⇒ Boolean
Test if the value is a boolean.
Methods included from Function::Connective::Conjunction::Methods
Methods included from Axiom::Aliasable
Methods included from Function::Connective::Disjunction::Methods
Methods included from Function::Connective::Negation::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, infer_type, #initialize, name_from, #rename, #required?, #type, #valid_primitive?
Methods included from Visitable
Constructor Details
This class inherits a constructor from Axiom::Attribute
Class Method Details
.primitive ⇒ Class<TrueClass>
The Boolean primitive
20 21 22 |
# File 'lib/axiom/attribute/boolean.rb', line 20 def self.primitive TrueClass end |
Instance Method Details
#valid_value?(value) ⇒ Boolean
Test if the value is a boolean
35 36 37 |
# File 'lib/axiom/attribute/boolean.rb', line 35 def valid_value?(value) valid_or_optional?(value) { super || value.kind_of?(FalseClass) } end |