Class: Mutant::Expression::Method
- Inherits:
-
Mutant::Expression
- Object
- Mutant::Expression
- Mutant::Expression::Method
- Defined in:
- lib/mutant/expression/method.rb
Overview
Explicit method expression
Constant Summary collapse
Constants inherited from Mutant::Expression
METHOD_NAME_PATTERN, REGISTRY, SCOPE_NAME_PATTERN, SCOPE_PATTERN
Instance Attribute Summary
Attributes inherited from Mutant::Expression
Instance Method Summary collapse
-
#matcher(cache) ⇒ Matcher::Method
private
Return method matcher.
Methods inherited from Mutant::Expression
#initialize, #match_length, parse
Constructor Details
This class inherits a constructor from Mutant::Expression
Instance Method Details
#matcher(cache) ⇒ Matcher::Method
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 method matcher
30 31 32 33 34 35 36 |
# File 'lib/mutant/expression/method.rb', line 30 def matcher(cache) methods_matcher = MATCHERS.fetch(scope_symbol).new(cache, scope) method = methods_matcher.methods.detect do |meth| meth.name == method_name end or raise NameError, "Cannot find method #{identifier}" methods_matcher.matcher.build(cache, scope, method) end |