Sha256: 3f9532281e6079909803a648f2c81d320d8d056046521fe807a246b144df6b60

Contents?: true

Size: 343 Bytes

Versions: 8

Compression:

Stored size: 343 Bytes

Contents

# frozen_string_literal: true

module Leftovers
  module Matchers
    class Or
      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/or.rb
leftovers-0.12.1 lib/leftovers/matchers/or.rb
leftovers-0.12.0 lib/leftovers/matchers/or.rb
leftovers-0.11.2 lib/leftovers/matchers/or.rb
leftovers-0.11.1 lib/leftovers/matchers/or.rb
leftovers-0.11.0 lib/leftovers/matchers/or.rb
leftovers-0.10.0 lib/leftovers/matchers/or.rb
leftovers-0.9.0 lib/leftovers/matchers/or.rb