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, method) ⇒ Matcher::Method::Instance
private
Dispatching builder, detects memoizable case.
Instance Method Summary collapse
-
#identification ⇒ String
private
Return identification.
Methods inherited from Mutant::Matcher::Method
Methods inherited from Mutant::Matcher
Class Method Details
.build(env, scope, 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
18 19 20 21 22 23 24 |
# File 'lib/mutant/matcher/method/instance.rb', line 18 def self.build(env, scope, method) name = method.name if scope.ancestors.include?(::Memoizable) && scope.memoized?(name) return Memoized.new(env, scope, method) end super end |
Instance Method Details
#identification ⇒ String
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.
Return identification
32 33 34 |
# File 'lib/mutant/matcher/method/instance.rb', line 32 def identification "#{scope.name}##{method_name}" end |