class Mutest::Matcher::Method::Instance

Matcher for instance methods

Public Class Methods

new(scope, target_method) click to toggle source

Dispatching builder, detects memoizable case

@param [Class, Module] scope @param [UnboundMethod] method

@return [Matcher::Method::Instance]

Calls superclass method
# File lib/mutest/matcher/method/instance.rb, line 12
def self.new(scope, target_method)
  name = target_method.name
  evaluator =
    if scope.include?(Memoizable) && scope.memoized?(name)
      Evaluator::Memoized
    else
      Evaluator
    end

  super(scope, target_method, evaluator)
end