Remove dead code
This commit is contained in:
parent
793e1d8080
commit
a872c9a1cb
1 changed files with 0 additions and 49 deletions
|
@ -1,49 +0,0 @@
|
|||
# encoding: utf-8
|
||||
|
||||
module Mutant
|
||||
class Mutation
|
||||
class Filter
|
||||
# Mutation filter that filters on mutation codes
|
||||
class Code < self
|
||||
include Concord::Public.new(:code)
|
||||
|
||||
# Test for match
|
||||
#
|
||||
# @param [Mutation] mutation
|
||||
#
|
||||
# @return [true]
|
||||
# returns true if mutation code matches filter code
|
||||
#
|
||||
# @return [false]
|
||||
# returns false otherwise
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def match?(mutation)
|
||||
mutation.code.eql?(code)
|
||||
end
|
||||
|
||||
PATTERN = /\Acode:(?<code>[a-f0-9]{1,6})\z/.freeze
|
||||
|
||||
# Test if class handles string
|
||||
#
|
||||
# @param [String] notation
|
||||
#
|
||||
# @return [Filter]
|
||||
# return code filter instance if notation matches pattern
|
||||
#
|
||||
# @return [nil]
|
||||
# returns nil otherwise
|
||||
#
|
||||
# @api private
|
||||
#
|
||||
def self.handle(notation)
|
||||
match = PATTERN.match(notation)
|
||||
return unless match
|
||||
new(match[:code])
|
||||
end
|
||||
|
||||
end # Code
|
||||
end # Filter
|
||||
end # Mutation
|
||||
end # Mutant
|
Loading…
Add table
Reference in a new issue