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+, includeing the top node.
#
# Also, doesn't nest
#
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+, includeing the top node.

Also, doesn't nest
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 + includeing the top node . Also doesn ' t nest
def look_for_alt(target_types, ignoring = [], &blk)
        return if ignoring.include?(type)
        if target_types.include? type
          blk.call(self)
        else
          each_sexp do |elem|
            elem.look_for_alt(target_types, ignoring, &blk)
          end
        end
      end
def look_for_alt ( target_types , ignoring = [ ] , & blk ) return if ignoring . include? ( type ) if target_types . include? type blk . call ( self ) else each_sexp do | elem | elem . look_for_alt ( target_types , ignoring , & blk ) end end 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_types
<not_specific>
ignoring
<not_specific>
blk
<not_specific>