Class: Mutant::Matcher::Method

Inherits:
Mutant::Matcher show all
Includes:
Adamantium::Flat, AST::NodePredicates
Defined in:
lib/mutant/matcher/method.rb,
lib/mutant/matcher/method/instance.rb,
lib/mutant/matcher/method/singleton.rb

Overview

Matcher for subjects that are a specific method

Direct Known Subclasses

Instance, Singleton

Defined Under Namespace

Classes: Instance, Singleton

Constant Summary collapse

BLACKLIST =

Methods within rbx kernel directory are precompiled and their source cannot be accessed via reading source location. Same for methods created by eval.

%r{\Akernel/|(eval)}.freeze

Instance Method Summary collapse

Methods inherited from Mutant::Matcher

build, #identification

Instance Method Details

#eachEnumerable<Subject>, self

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.

Enumerate matches



22
23
24
25
26
27
28
29
30
# File 'lib/mutant/matcher/method.rb', line 22

def each
  return to_enum unless block_given?

  if !skip? && subject
    yield subject
  end

  self
end