Class: Mutant::Mutation::Filter::Whitelist

Inherits:
Mutant::Mutation::Filter show all
Includes:
Adamantium::Flat
Defined in:
lib/mutant/mutation/filter/whitelist.rb

Overview

Whiltelist filter

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Mutant::Mutation::Filter

build, handle

Instance Attribute Details

#whitelistEnumerable<Filter> (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return whitelist

Returns:



31
32
33
# File 'lib/mutant/mutation/filter/whitelist.rb', line 31

def whitelist
  @whitelist
end

Instance Method Details

#match?(mutation) ⇒ true, false

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Test for match

Parameters:

Returns:

  • (true)

    returns true if mutation matches whitelist

  • (false)

    returns false otherwise



21
22
23
# File 'lib/mutant/mutation/filter/whitelist.rb', line 21

def match?(mutation)
  @whitelist.any? { |filter| filter.match?(mutation) }
end