+ # Condition to select this method from a request
+ var conds = new Array[String]
+
+ # Name of the resource from the method or as renamed
+ var resource_conds = new Array[String]
+ for resource in method.restful_resources do resource_conds.add "resource == \"{resource}\""
+ conds.add "(" + resource_conds.join(" or ") + ")"
+
+ # HTTP methods/verbs
+ if method.restful_verbs.not_empty then
+ var method_conds = new Array[String]
+ for meth in method.restful_verbs do method_conds.add "request.method == \"{meth}\""
+ conds.add "(" + method_conds.join(" or ") + ")"
+ end
+
+ t.add """if {{{conds.join(" and ")}}} then