lib/predicator/visitors/string.rb in predicator-1.1.0 vs lib/predicator/visitors/string.rb in predicator-1.2.0
- old
+ new
@@ -53,8 +53,24 @@
end
def visit_NOTIN node
[visit(node.left), " not in ", visit(node.right)].join
end
+
+ def visit_STRSTARTSWITH node
+ [visit(node.left), " starts with ", visit(node.right)].join
+ end
+
+ def visit_STRENDSWITH node
+ [visit(node.left), " ends with ", visit(node.right)].join
+ end
+
+ def visit_DATEAGO node
+ visit(node.left) + " ago"
+ end
+
+ def visit_DATEFROMNOW node
+ visit(node.left) + " from now"
+ end
end
end
end