Sha256: 9b94fb63370c19ff78032ad944664de3de83fc5cb0f903abd4053de1009d4472

Contents?: true

Size: 344 Bytes

Versions: 8

Compression:

Stored size: 344 Bytes

Contents

# frozen_string_literal: true

module Leftovers
  module Matchers
    class And
      include ComparableInstance

      attr_reader :lhs, :rhs

      def initialize(lhs, rhs)
        @lhs = lhs
        @rhs = rhs

        freeze
      end

      def ===(value)
        @lhs === value && @rhs === value
      end

      freeze
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
leftovers-0.12.2 lib/leftovers/matchers/and.rb
leftovers-0.12.1 lib/leftovers/matchers/and.rb
leftovers-0.12.0 lib/leftovers/matchers/and.rb
leftovers-0.11.2 lib/leftovers/matchers/and.rb
leftovers-0.11.1 lib/leftovers/matchers/and.rb
leftovers-0.11.0 lib/leftovers/matchers/and.rb
leftovers-0.10.0 lib/leftovers/matchers/and.rb
leftovers-0.9.0 lib/leftovers/matchers/and.rb