e9931f6abe
* Backlists should "work" now. * CLI (match expression) classifiers are not used as matchers anymore
28 lines
527 B
Ruby
28 lines
527 B
Ruby
# encoding: utf-8
|
|
|
|
module Mutant
|
|
class Predicate
|
|
|
|
# Whiltelist filter
|
|
class Whitelist < self
|
|
include Adamantium::Flat, Concord.new(:whitelist)
|
|
|
|
# Test for match
|
|
#
|
|
# @param [Object] object
|
|
#
|
|
# @return [true]
|
|
# if mutation matches whitelist
|
|
#
|
|
# @return [false]
|
|
# otherwise
|
|
#
|
|
# @api private
|
|
#
|
|
def match?(object)
|
|
whitelist.any? { |filter| filter.match?(object) }
|
|
end
|
|
|
|
end # Whitelist
|
|
end # Predicate
|
|
end # Mutant
|