Module: Predicate::DyadicComp

Includes:
Expr
Included in:
Eq, Gt, Gte, Lt, Lte, Neq
Defined in:
lib/predicate/nodes/dyadic_comp.rb

Constant Summary

Constants included from Expr

Expr::OP_NEGATIONS

Instance Method Summary collapse

Methods included from Expr

#&, #and_split, #constant_variables, #contradiction?, #qualify, #rename, #sexpr, #tautology?, #to_proc, #to_ruby_code, #to_sequel, #|

Methods included from Factory

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

Instance Method Details

#!Object



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

def !
  Factory.send(OP_NEGATIONS[first], self[1], self[2])
end

#free_variablesObject



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

def free_variables
  @free_variables ||= left.free_variables | right.free_variables
end

#leftObject



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

def left
  self[1]
end

#priorityObject



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

def priority
  50
end

#rightObject



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

def right
  self[2]
end