From adc3e4aacf5da4ba36156811e457cc1518f42bf7 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Fri, 14 Jun 2013 21:05:52 +0200 Subject: [PATCH] Use concord to cleanup regexp mutation filter --- lib/mutant/mutation/filter/regexp.rb | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/lib/mutant/mutation/filter/regexp.rb b/lib/mutant/mutation/filter/regexp.rb index 499f9edf..95a951f1 100644 --- a/lib/mutant/mutation/filter/regexp.rb +++ b/lib/mutant/mutation/filter/regexp.rb @@ -3,6 +3,7 @@ module Mutant class Filter # Mutaiton filter filtering in regexp match on mutation identification class Regexp < self + include Concord::Public.new(:regexp) # Test for match # @@ -17,21 +18,7 @@ module Mutant # @api private # def match?(mutation) - !!(@regexp =~ mutation.identification) - end - - private - - # Initialize regexp filter - # - # @param [Regexp] regexp - # - # @return [undefined] - # - # @api private - # - def initialize(regexp) - @regexp = regexp + !!(regexp =~ mutation.identification) end end # Regexp