Sha256: 96dbaf52fe15e6aa82c7f6a4e466eccf6d862c5c26dc24cc4423be2e2cd6a97e

Contents?: true

Size: 398 Bytes

Versions: 8

Compression:

Stored size: 398 Bytes

Contents

module Mutant
  class Matcher
    # Matcher filter
    class Filter < self
      include Concord.new(:matcher, :predicate)

      # Enumerate matches
      #
      # @param [Env::Bootstrap] env
      #
      # @return [Enumerable<Subject>]
      def call(env)
        matcher
          .call(env)
          .select(&predicate.method(:call))
      end

    end # Filter
  end # Matcher
end # Mutant

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mutant-0.8.16 lib/mutant/matcher/filter.rb
mutant-0.8.15 lib/mutant/matcher/filter.rb
mutant-0.8.14 lib/mutant/matcher/filter.rb
mutant-0.8.13 lib/mutant/matcher/filter.rb
mutant-0.8.12 lib/mutant/matcher/filter.rb
mutant-0.8.11 lib/mutant/matcher/filter.rb
mutant-0.8.10 lib/mutant/matcher/filter.rb
mutant-0.8.9 lib/mutant/matcher/filter.rb