class Mutest::Expression::Methods

Abstract base class for methods expression

Constants

MATCHERS
REGEXP

Public Instance Methods

match_length(expression) click to toggle source

Length of match with other expression

@param [Expression] expression

@return [Integer]

# 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() click to toggle source

Matcher on expression

@return [Matcher::Method]

# File lib/mutest/expression/methods.rb, line 31
def matcher
  MATCHERS.fetch(scope_symbol).new(scope)
end
syntax() click to toggle source

Syntax of expression

@return [String]

# File lib/mutest/expression/methods.rb, line 23
def syntax
  [scope_name, scope_symbol].join
end

Private Instance Methods

scope() click to toggle source

Scope object

@return [Class, Method]

# File lib/mutest/expression/methods.rb, line 53
def scope
  Object.const_get(scope_name)
end