Matches only when all sub-expressions match.
This is also available via Matcher#&.
examples:
s(:a) / s{ all(s(:a), s(:b)) } #=> [] s(:a, :b) / s{ t(:a) & include(:b)) } #=> [s(:a, :b)]
The collection of sub-matchers to match against.
Create an All matcher which will match all of the
options
.
# File lib/sexp.rb, line 996 def initialize *options @options = options end
Satisfied when all sub expressions match o
# File lib/sexp.rb, line 1003 def satisfy? o options.all? { |exp| exp.kind_of?(Sexp) ? exp.satisfy?(o) : exp == o } end