Class: Mutant::Predicate::Whitelist

Inherits:
Mutant::Predicate show all
Includes:
Adamantium::Flat
Defined in:
lib/mutant/predicate/whitelist.rb

Overview

Whiltelist filter

Instance Method Summary collapse

Methods inherited from Mutant::Predicate

handle

Instance Method Details

#match?(object) ⇒ 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:

  • object (Object)

Returns:

  • (true)

    if mutation matches whitelist

  • (false)

    otherwise



22
23
24
# File 'lib/mutant/predicate/whitelist.rb', line 22

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