class SexpPath::SexpCollection
Wraps the results of a SexpPath
query. SexpCollection
defines SexpCollection#search
so that you can chain queries.
For instance:
res = s(:a, s(:b)) / Q?{ s(:a,_) } / Q?{ s(:b) }
Public Instance Methods
search(pattern)
click to toggle source
See Traverse#search
# File lib/sexp_path/sexp_collection.rb, line 11 def search(pattern) inject(SexpCollection.new){|collection, match| collection.concat match.search(pattern, match) } end
Also aliased as: /