vendor/bundle/gems/sexp_processor-4.11.0/lib/sexp.rb
##
# Recursively searches for the +pattern+ yielding the matches.
Recursively searches for the +pattern+ yielding the matches.
Recursively searches for the + pattern + yielding the matches .
def search_each pattern, &block 
    raise ArgumentError, "Needs a pattern" unless pattern.kind_of? Matcher
    return enum_for(:search_each, pattern) unless block_given?
    if pattern.satisfy? self then
      yield self
    end
    self.each_sexp do |subset|
      subset.search_each pattern, &block
    end
  end
def search_each pattern , & block raise ArgumentError , "Needs a pattern" unless pattern . kind_of? Matcher return enum_for ( :search_each , pattern ) unless block_given? if pattern . satisfy? self then yield self end self . each_sexp do | subset | subset . search_each pattern , & block end end
Recursively searches for the +pattern+ yielding the matches.
Recursively searches for the + pattern + yielding the matches .
# TODO: rename to grep?
pattern
block