Module: Predicate::Native
- Includes:
- Expr
- Defined in:
- lib/predicate/nodes/native.rb
Constant Summary
Constants included
from Expr
Expr::OP_NEGATIONS
Instance Method Summary
collapse
Methods included from Expr
#!, #&, #constant_variables, #contradiction?, #qualify, #rename, #sexpr, #tautology?, #to_sequel, #|
Methods included from Factory
#and, #between, #comp, #contradiction, #from_hash, #identifier, #in, #literal, #native, #not, #or, #qualified_identifier, #tautology
Instance Method Details
#and_split(attr_list) ⇒ Object
13
14
15
16
17
|
# File 'lib/predicate/nodes/native.rb', line 13
def and_split(attr_list)
[ self, tautology ]
end
|
#free_variables ⇒ Object
31
32
33
|
# File 'lib/predicate/nodes/native.rb', line 31
def free_variables
raise NotSupportedError
end
|
#priority ⇒ Object
5
6
7
|
# File 'lib/predicate/nodes/native.rb', line 5
def priority
90
end
|
#proc ⇒ Object
9
10
11
|
# File 'lib/predicate/nodes/native.rb', line 9
def proc
self[1]
end
|
#to_proc(scope = 't') ⇒ Object
27
28
29
|
# File 'lib/predicate/nodes/native.rb', line 27
def to_proc(scope = 't')
proc
end
|
#to_ruby_code(scope = 't') ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/predicate/nodes/native.rb', line 19
def to_ruby_code(scope = 't')
if proc.respond_to?(:source_code)
code = proc.source_code
return code if code
end
raise NotSupportedError
end
|