Module: Predicate::Tautology

Includes:
Expr
Defined in:
lib/predicate/nodes/tautology.rb

Constant Summary

Constants included from Expr

Expr::OP_NEGATIONS

Instance Method Summary collapse

Methods included from Expr

#and_split, #constant_variables, #constants, #contradiction?, #identifier?, #literal?, #opaque?, #qualify, #rename, #sexpr, #to_s, #to_sequel

Methods included from Factory

#and, #between, #comp, #contradiction, #from_hash, #identifier, #in, #intersect, #literal, #match, #native, #not, #opaque, #or, #qualified_identifier, #tautology

Instance Method Details

#!Object



9
10
11
# File 'lib/predicate/nodes/tautology.rb', line 9

def !
  contradiction
end

#&(other) ⇒ Object



13
14
15
# File 'lib/predicate/nodes/tautology.rb', line 13

def &(other)
  other
end

#attr_splitObject



33
34
35
# File 'lib/predicate/nodes/tautology.rb', line 33

def attr_split
  {}
end

#dyadic_priorityObject



21
22
23
# File 'lib/predicate/nodes/tautology.rb', line 21

def dyadic_priority
  1000
end

#evaluate(tuple) ⇒ Object



37
38
39
# File 'lib/predicate/nodes/tautology.rb', line 37

def evaluate(tuple)
  true
end

#free_variablesObject



29
30
31
# File 'lib/predicate/nodes/tautology.rb', line 29

def free_variables
  @free_variables ||= []
end

#priorityObject



25
26
27
# File 'lib/predicate/nodes/tautology.rb', line 25

def priority
  100
end

#tautology?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/predicate/nodes/tautology.rb', line 5

def tautology?
  true
end

#|(other) ⇒ Object



17
18
19
# File 'lib/predicate/nodes/tautology.rb', line 17

def |(other)
  self
end