Class: Mutant::Matcher::Chain

Inherits:
Mutant::Matcher show all
Defined in:
lib/mutant/matcher/chain.rb

Overview

A chain of matchers

Instance Method Summary collapse

Methods inherited from Mutant::Matcher

build, #identification

Instance Method Details

#each(&block) ⇒ Enumerator<Subject] if no block given, self

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 subjects



17
18
19
20
21
22
23
24
25
# File 'lib/mutant/matcher/chain.rb', line 17

def each(&block)
  return to_enum unless block_given?

  matchers.each do |matcher|
    matcher.each(&block)
  end

  self
end