Sha256: aa04e70a78b902de7f927382339cda6e4566f701bde7d35e97dd5f1ae3878b51

Contents?: true

Size: 446 Bytes

Versions: 8

Compression:

Stored size: 446 Bytes

Contents

# frozen_string_literal: true

module Mutant
  class Matcher
    # Matcher chaining results of other matchers together
    class Chain < self
      include Concord.new(:matchers)

      # Call matcher
      #
      # @param [Env::Bootstrap] env
      #
      # @return [Enumerable<Subject>]
      def call(env)
        matchers.flat_map do |matcher|
          matcher.call(env)
        end
      end

    end # Chain
  end # Matcher
end # Mutant

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mutant-0.8.24 lib/mutant/matcher/chain.rb
mutant-0.8.23 lib/mutant/matcher/chain.rb
mutant-0.8.22 lib/mutant/matcher/chain.rb
mutant-0.8.21 lib/mutant/matcher/chain.rb
mutant-0.8.20 lib/mutant/matcher/chain.rb
mutant-0.8.19 lib/mutant/matcher/chain.rb
mutant-0.8.18 lib/mutant/matcher/chain.rb
mutant-0.8.17 lib/mutant/matcher/chain.rb