Class: Mutant::Matcher::Methods

Inherits:
Mutant::Matcher show all
Includes:
AbstractType
Defined in:
lib/mutant/matcher/methods.rb

Overview

Abstract base class for matcher that returns method subjects from scope

Direct Known Subclasses

Instance, Singleton

Defined Under Namespace

Classes: Instance, Singleton

Constant Summary collapse

CANDIDATE_NAMES =
IceNine.deep_freeze(%i[
  public_instance_methods
  private_instance_methods
  protected_instance_methods
])

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.

Enumerate subjects

Parameters:

Returns:



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

def call(env)
  Chain.new(
    methods.map { |method| matcher.new(scope, method) }
  ).call(env)
end