Method: Arel::Nodes::Node#each
- Defined in:
- lib/activerecord-arel_depth_first/nodes/node.rb
#each(&block) ⇒ Object
Iterate through AST, nodes will be yielded depth-first
9 10 11 12 13 |
# File 'lib/activerecord-arel_depth_first/nodes/node.rb', line 9 def each(&block) return enum_for(:each) unless block_given? ::Arel::Visitors::DepthFirst.new(block).accept self end |