Class: Mutant::Matcher::Method::Evaluator Private

Inherits:
Object
  • Object
show all
Includes:
AST::NodePredicates, Procto, Unparser::AbstractType, Unparser::Adamantium
Defined in:
lib/mutant/matcher/method.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 method match evaluator

Present to avoid passing the env argument around in case the logic would be implemented directly on the Matcher::Method instance

rubocop:disable Metrics/ClassLength

Instance Method Summary collapse

Methods included from Procto

included

Instance Method Details

#callEnumerable<Subject>

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.

Matched subjects

Returns:



50
51
52
53
54
55
56
57
58
59
60
# File 'lib/mutant/matcher/method.rb', line 50

def call
  location = source_location

  if location.nil? || !location.first.end_with?('.rb')
    env.warn(SOURCE_LOCATION_WARNING_FORMAT % target_method)

    return EMPTY_ARRAY
  end

  match_view
end