Class: Mutant::Mutation::Filter::Regexp

Inherits:
Mutant::Mutation::Filter show all
Defined in:
lib/mutant/mutation/filter/regexp.rb

Overview

Mutaiton filter filtering in regexp match on mutation identification

Instance Method Summary collapse

Methods inherited from Mutant::Mutation::Filter

build, handle

Instance Method Details

#match?(mutation) ⇒ true, false

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.

Test for match

Parameters:

Returns:

  • (true)

    returns true if mutation identification is matched by regexp

  • (false)

    returns false otherwise



19
20
21
# File 'lib/mutant/mutation/filter/regexp.rb', line 19

def match?(mutation)
  !!@regexp.match =~ mutation.identification
end