Class: Mutant::Matcher::Scope Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Matcher expanding Mutant::Scope objects into method matches at singleton or instance level

If we ever get other subjects than methods, its likely the place to hook in custom matchers. In that case the scope matchers to expand should be passed as arguments to the constructor.

Constant Summary collapse

MATCHERS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

[
  Matcher::Methods::Singleton,
  Matcher::Methods::Instance,
  Matcher::Methods::Metaclass
].freeze

Instance Method Summary collapse

Methods inherited from Mutant::Matcher

from_config, ignore_subject?

Instance Method Details

#call(env) ⇒ Enumerable<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.

Matched subjects

Parameters:

Returns:



27
28
29
# File 'lib/mutant/matcher/scope.rb', line 27

def call(env)
  Chain.new(effective_matchers).call(env)
end