Class: Mutant::Matcher::Method::Instance Private
- Inherits:
-
Mutant::Matcher::Method
- Object
- Mutant::Matcher
- Mutant::Matcher::Method
- Mutant::Matcher::Method::Instance
- Defined in:
- lib/mutant/matcher/method/instance.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 for instance methods
Defined Under Namespace
Classes: Evaluator
Constant Summary
Constants inherited from Mutant::Matcher::Method
CLOSURE_WARNING_FORMAT, CONSTANT_SCOPES, SOURCE_LOCATION_WARNING_FORMAT
Class Method Summary collapse
-
.new(scope:, target_method:) ⇒ Matcher::Method::Instance
private
Dispatching builder, detects memoizable case.
Methods inherited from Mutant::Matcher::Method
Methods inherited from Mutant::Matcher
Class Method Details
.new(scope:, target_method:) ⇒ Matcher::Method::Instance
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.
Dispatching builder, detects memoizable case
rubocop:disable Metrics/MethodLength
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/mutant/matcher/method/instance.rb', line 17 def self.new(scope:, target_method:) evaluator = if memoized_method?(scope, target_method.name) Evaluator::Memoized else Evaluator end super( evaluator:, scope:, target_method: ) end |