class Sexp::All
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)]
  Attributes
The collection of sub-matchers to match against.
Public Class Methods
Source
# File lib/sexp_matcher.rb, line 656 def initialize *options @options = options end
Create an All matcher which will match all of the options.
Public Instance Methods
Source
# File lib/sexp_matcher.rb, line 663 def satisfy? o options.all? { |exp| exp.kind_of?(Sexp) ? exp.satisfy?(o) : exp == o } end
Satisfied when all sub expressions match o