Class: Mutant::Matcher::Method::Instance
- Inherits:
-
Mutant::Matcher::Method
- Object
- Mutant::Matcher
- Mutant::Matcher::Method
- Mutant::Matcher::Method::Instance
- Defined in:
- lib/mutant/matcher/method/instance.rb
Overview
Matcher for instance methods
Direct Known Subclasses
Defined Under Namespace
Classes: Memoized
Constant Summary collapse
Constants inherited from Mutant::Matcher::Method
Class Method Summary collapse
-
.build(env, 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
.build(env, 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
17 18 19 20 21 22 23 |
# File 'lib/mutant/matcher/method/instance.rb', line 17 def self.build(env, scope, target_method) name = target_method.name if scope.ancestors.include?(::Memoizable) && scope.memoized?(name) return Memoized.new(env, scope, target_method) end super end |