lib/predicate/processors/to_ruby_code.rb in predicate-1.1.3 vs lib/predicate/processors/to_ruby_code.rb in predicate-1.2.0
- old
+ new
@@ -47,9 +47,13 @@
def on_in(sexpr)
"#{to_ruby_literal(sexpr.values)}.include?(#{apply(sexpr.identifier)})"
end
+ def on_intersect(sexpr)
+ "!(#{apply(sexpr.identifier)} & #{to_ruby_literal(sexpr.values)}).empty?"
+ end
+
def on_literal(sexpr)
to_ruby_literal(sexpr.last)
end
protected