diff options
Diffstat (limited to 'lib/arel/visitors/depth_first.rb')
-rw-r--r-- | lib/arel/visitors/depth_first.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/arel/visitors/depth_first.rb b/lib/arel/visitors/depth_first.rb index 00f18727f0..49133653c5 100644 --- a/lib/arel/visitors/depth_first.rb +++ b/lib/arel/visitors/depth_first.rb @@ -47,11 +47,15 @@ module Arel alias :visit_Arel_Nodes_InnerJoin :join alias :visit_Arel_Nodes_OuterJoin :join + def nary o + o.children.each { |child| visit child } + end + alias :visit_Arel_Nodes_And :nary + def binary o visit o.left visit o.right end - alias :visit_Arel_Nodes_And :binary alias :visit_Arel_Nodes_As :binary alias :visit_Arel_Nodes_Assignment :binary alias :visit_Arel_Nodes_Between :binary |