Use concord to cleanup regexp mutation filter

This commit is contained in:
Markus Schirp 2013-06-14 21:05:52 +02:00
parent db2e5a5ff5
commit adc3e4aacf

View file

@ -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