Sha256: 36deefeb163e8c5b2a6247cf0e253bf8ddcd8c57a91b74c094e7c7101b40f787

Contents?: true

Size: 432 Bytes

Versions: 10

Compression:

Stored size: 432 Bytes

Contents

# frozen_string_literal: true

module Leftovers
  module Matchers
    class All
      # :nocov:
      using ::Leftovers::Backports::SetCaseEq if defined?(::Leftovers::Backports::SetCaseEq)
      # :nocov:

      def initialize(matchers)
        @matchers = matchers

        freeze
      end

      def ===(value)
        @matchers.all? do |matcher|
          matcher === value
        end
      end

      freeze
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
leftovers-0.5.5 lib/leftovers/matchers/all.rb
leftovers-0.5.4 lib/leftovers/matchers/all.rb
leftovers-0.5.3 lib/leftovers/matchers/all.rb
leftovers-0.5.2 lib/leftovers/matchers/all.rb
leftovers-0.5.1 lib/leftovers/matchers/all.rb
leftovers-0.5.0 lib/leftovers/matchers/all.rb
leftovers-0.4.3 lib/leftovers/matchers/all.rb
leftovers-0.4.2 lib/leftovers/matchers/all.rb
leftovers-0.4.1 lib/leftovers/matchers/all.rb
leftovers-0.4.0 lib/leftovers/matchers/all.rb