lib/reek/source/sexp_node.rb
#
# Carries out a depth-first traversal of this syntax tree, yielding
# every Sexp of type +target_type+. The traversal ignores any node
# whose type is listed in the Array +ignoring+.
#
Carries out a depth-first traversal of this syntax tree, yielding
every Sexp of type +target_type+. The traversal ignores any node
whose type is listed in the Array +ignoring+.
Carries out a depth - first traversal of this syntax tree yielding every Sexp of type + target_type + . The traversal ignores any node whose type is listed in the Array + ignoring + .
def look_for(target_type, ignoring = [], &blk)
        each_sexp do |elem|
          elem.look_for(target_type, ignoring, &blk) unless ignoring.include?(elem.type)
        end
        blk.call(self) if type == target_type
      end
def look_for ( target_type , ignoring = [ ] , & blk ) each_sexp do | elem | elem . look_for ( target_type , ignoring , & blk ) unless ignoring . include? ( elem . type ) end blk . call ( self ) if type == target_type end
Carries out a depth-first traversal of this syntax tree, yielding
every Sexp of type +target_type+.
Carries out a depth - first traversal of this syntax tree yielding every Sexp of type + target_type + .
target_type
<not_specific>
ignoring
<not_specific>
blk
<not_specific>