Class: Mutant::Matcher::Methods Private

Inherits:
Mutant::Matcher show all
Includes:
Unparser::AbstractType
Defined in:
lib/mutant/matcher/methods.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.

Abstract base class for matcher that returns method subjects from scope

Direct Known Subclasses

Instance, Metaclass, Singleton

Defined Under Namespace

Classes: Instance, Metaclass, Singleton

Constant Summary collapse

CANDIDATE_NAMES =

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.

%i[
  public_instance_methods
  private_instance_methods
  protected_instance_methods
].freeze

Instance Method Summary collapse

Methods inherited from Mutant::Matcher

expand

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.

Enumerate subjects

Parameters:

Returns:



22
23
24
25
26
27
28
# File 'lib/mutant/matcher/methods.rb', line 22

def call(env)
  Chain.new(
    matchers: methods(env).map do |target_method|
      matcher.new(scope:, target_method:)
    end
  ).call(env)
end