Sha256: f1dba82de95c57108fb79f64362c42f1927fc16baaf7e8071eeab701a379b54a

Contents?: true

Size: 816 Bytes

Versions: 18

Compression:

Stored size: 816 Bytes

Contents

module Mutant
  class Mutation
    class Filter
      # Mutaiton filter filtering in regexp match on mutation identification
      class Regexp < self

        # Test for match
        #
        # @param [Mutation] mutation
        #
        # @return [true]
        #   returns true if mutation identification is matched by regexp
        #
        # @return [false]
        #   returns false otherwise
        #
        # @api private
        #
        def match?(mutation)
          !!@regexp.match =~ mutation.identification
        end

      private

        # Initialize regexp filter
        #
        # @param [Regexp] regexp
        #
        # @return [undefined]
        #
        # @api private
        #
        def initialize(regexp)
          @regexp = regexp
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
mutant-0.2.20 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.17 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.16 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.15 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.14 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.13 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.12 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.11 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.9 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.8 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.7 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.6 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.5 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.4 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.3 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.2 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.1 lib/mutant/mutation/filter/regexp.rb
mutant-0.2.0 lib/mutant/mutation/filter/regexp.rb