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, #bind, #constant_variables, #constants, #contradiction?, #identifier?, #literal?, #opaque?, #qualify, #rename, #sexpr, #to_postgres, #to_s, #to_sequel, #unqualify

Methods included from Factory

#_factor_predicate, #and, #comp, #contradiction, #empty, #from_hash, #h, #has_size, #identifier, #in, #literal, #match, #native, #not, #opaque, #or, #pg_array_empty, #pg_array_literal, #pg_array_overlaps, #placeholder, #qualified_identifier, #sexpr, #tautology, #var, #vars

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



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

def attr_split
  {}
end

#dyadic_priorityObject



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

def dyadic_priority; 1000; end

#evaluate(tuple) ⇒ Object



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

def evaluate(tuple)
  true
end

#free_variablesObject



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

def free_variables
  @free_variables ||= []
end

#priorityObject



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

def priority; 100; end

#tautology?Boolean

Returns:

  • (Boolean)


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

def tautology?
  true
end

#to_hashObject



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

def to_hash
  {}
end

#|(other) ⇒ Object



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

def |(other)
  self
end