Sha256: 08ddb3422b6d02a739a60a1ea61e6ee7c8aa7c00ba17f241609ffe7d68be267b

Contents?: true

Size: 488 Bytes

Versions: 22

Compression:

Stored size: 488 Bytes

Contents

module Enumerable
  def wildcard_match?(other)
    if is_a?(String)
      return RR::Expectations::ArgumentEqualityExpectation.recursive_safe_eq(self, other)
    end
    return false unless other.is_a?(Enumerable)
    other_entries = other.entries
    each_with_index do |value, i|
      if value.respond_to?(:wildcard_match?)
        return false unless value.wildcard_match?(other_entries[i])
      else
        return false unless value == other_entries[i]
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
rr-3.1.1 lib/rr/core_ext/enumerable.rb
rr-3.1.0 lib/rr/core_ext/enumerable.rb
rr-3.0.9 lib/rr/core_ext/enumerable.rb
rr-3.0.8 lib/rr/core_ext/enumerable.rb
rr-3.0.7 lib/rr/core_ext/enumerable.rb
rr-3.0.6 lib/rr/core_ext/enumerable.rb
rr-3.0.5 lib/rr/core_ext/enumerable.rb
rr-3.0.4 lib/rr/core_ext/enumerable.rb
rr-3.0.3 lib/rr/core_ext/enumerable.rb
rr-3.0.2 lib/rr/core_ext/enumerable.rb
rr-3.0.1 lib/rr/core_ext/enumerable.rb
rr-3.0.0 lib/rr/core_ext/enumerable.rb
rr-1.2.1 lib/rr/core_ext/enumerable.rb
rr-1.2.0 lib/rr/core_ext/enumerable.rb
rr-1.1.2 lib/rr/core_ext/enumerable.rb
rr-1.1.2.rc1 lib/rr/core_ext/enumerable.rb
rr-1.1.1 lib/rr/core_ext/enumerable.rb
rr-1.1.1.rc1 lib/rr/core_ext/enumerable.rb
rr-1.1.0 lib/rr/core_ext/enumerable.rb
rr-1.1.0.rc3 lib/rr/core_ext/enumerable.rb