Class: Mutant::Matcher::Filter
- Inherits:
-
Mutant::Matcher
- Object
- Mutant::Matcher
- Mutant::Matcher::Filter
- Defined in:
- lib/mutant/matcher/filter.rb
Overview
Matcher filter
Instance Method Summary collapse
-
#each(&block) ⇒ self, Enumerator<Subject>
private
Enumerate matches.
Methods inherited from Mutant::Matcher
Instance Method Details
#each(&block) ⇒ self, Enumerator<Subject>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Enumerate matches
17 18 19 20 21 |
# File 'lib/mutant/matcher/filter.rb', line 17 def each(&block) return to_enum unless block_given? matcher.select(&predicate.method(:call)).each(&block) self end |