class Sexp::MatchCollection
Wraps the results of a Sexp query. MatchCollection
defines MatchCollection#/
so that you can chain queries.
For instance:
res = s(:a, s(:b)) / s{ s(:a,_) } / s{ s(:b) }
Public Instance Methods
/(pattern)
click to toggle source
See Traverse#search
# File lib/sexp_matcher.rb, line 1082 def / pattern inject(self.class.new) { |result, match| result.concat match / pattern } end