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(cache, scope, method) ⇒ Matcher::Method::Instance
private
Dispatching builder, detects adamantium 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(cache, 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 adamantium case
20 21 22 23 24 25 26 |
# File 'lib/mutant/matcher/method/instance.rb', line 20 def self.build(cache, scope, method) name = method.name if scope.ancestors.include?(::Adamantium) and scope.memoized?(name) return Memoized.new(cache, 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
34 35 36 |
# File 'lib/mutant/matcher/method/instance.rb', line 34 def identification "#{scope.name}##{method_name}" end |