Class: Mutest::Expression::Methods Private
- Inherits:
-
Mutest::Expression
- Object
- Mutest::Expression
- Mutest::Expression::Methods
- Defined in:
- lib/mutest/expression/methods.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Abstract base class for methods expression
Constant Summary collapse
- MATCHERS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
IceNine.deep_freeze( '.' => Matcher::Methods::Singleton, '#' => Matcher::Methods::Instance )
- REGEXP =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
/\A#{SCOPE_NAME_PATTERN}#{SCOPE_SYMBOL_PATTERN}\z/
Constants inherited from Mutest::Expression
SCOPE_NAME_PATTERN, SCOPE_SYMBOL_PATTERN
Instance Method Summary collapse
-
#match_length(expression) ⇒ Fixnum
private
Length of match with other expression.
-
#matcher ⇒ Matcher::Method
private
Matcher on expression.
-
#syntax ⇒ String
private
Syntax of expression.
Methods inherited from Mutest::Expression
Instance Method Details
#match_length(expression) ⇒ Fixnum
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.
Length of match with other expression
40 41 42 43 44 45 46 |
# File 'lib/mutest/expression/methods.rb', line 40 def match_length(expression) if expression.syntax.start_with?(syntax) syntax.length else 0 end end |
#matcher ⇒ 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.
Matcher on expression
31 32 33 |
# File 'lib/mutest/expression/methods.rb', line 31 def matcher MATCHERS.fetch(scope_symbol).new(scope) end |
#syntax ⇒ 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.
Syntax of expression
23 24 25 |
# File 'lib/mutest/expression/methods.rb', line 23 def syntax [scope_name, scope_symbol].join end |