Use concord to cleanup regexp mutation filter
This commit is contained in:
parent
db2e5a5ff5
commit
adc3e4aacf
1 changed files with 2 additions and 15 deletions
|
@ -3,6 +3,7 @@ module Mutant
|
||||||
class Filter
|
class Filter
|
||||||
# Mutaiton filter filtering in regexp match on mutation identification
|
# Mutaiton filter filtering in regexp match on mutation identification
|
||||||
class Regexp < self
|
class Regexp < self
|
||||||
|
include Concord::Public.new(:regexp)
|
||||||
|
|
||||||
# Test for match
|
# Test for match
|
||||||
#
|
#
|
||||||
|
@ -17,21 +18,7 @@ module Mutant
|
||||||
# @api private
|
# @api private
|
||||||
#
|
#
|
||||||
def match?(mutation)
|
def match?(mutation)
|
||||||
!!(@regexp =~ mutation.identification)
|
!!(regexp =~ mutation.identification)
|
||||||
end
|
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
# Initialize regexp filter
|
|
||||||
#
|
|
||||||
# @param [Regexp] regexp
|
|
||||||
#
|
|
||||||
# @return [undefined]
|
|
||||||
#
|
|
||||||
# @api private
|
|
||||||
#
|
|
||||||
def initialize(regexp)
|
|
||||||
@regexp = regexp
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end # Regexp
|
end # Regexp
|
||||||
|
|
Loading…
Reference in a new issue