Class: Mutant::Matcher::Scope

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

Overview

Matcher for specific namespace

Constant Summary collapse

MATCHERS =
[
  Matcher::Methods::Singleton,
  Matcher::Methods::Instance
].freeze

Instance Method Summary collapse

Methods inherited from Mutant::Matcher

build, each, #identification

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 subjects

Returns:

  • (self)

    if block given

  • (Enumerator<Subject>)

    otherwise



24
25
26
27
28
29
30
31
32
# File 'lib/mutant/matcher/scope.rb', line 24

def each(&block)
  return to_enum unless block_given?

  MATCHERS.each do |matcher|
    matcher.each(cache, scope, &block)
  end

  self
end