Class: Mutant::Expression::Methods

Inherits:
Mutant::Expression show all
Defined in:
lib/mutant/expression/methods.rb

Overview

Abstrat base class for methods expression

Constant Summary collapse

MATCHERS =
{
  '.' => Matcher::Methods::Singleton,
  '#' => Matcher::Methods::Instance
}.freeze

Constants inherited from Mutant::Expression

METHOD_NAME_PATTERN, REGISTRY, SCOPE_NAME_PATTERN, SCOPE_PATTERN

Instance Attribute Summary

Attributes inherited from Mutant::Expression

#syntax

Instance Method Summary collapse

Methods inherited from Mutant::Expression

#initialize, #match_length, parse, #prefix?, try_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

Parameters:

Returns:



24
25
26
# File 'lib/mutant/expression/methods.rb', line 24

def matcher(cache)
  MATCHERS.fetch(scope_symbol).new(cache, scope)
end