Class: Mutant::Matcher::Scope

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

Overview

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 =
[
  Matcher::Methods::Singleton,
  Matcher::Methods::Instance
].freeze

Instance Method Summary collapse

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:



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

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