Sha256: 3b9ed74c21b52c8a1fa2ca52443b087376c1d09f8744a545f16be91faf0441c2

Contents?: true

Size: 352 Bytes

Versions: 14

Compression:

Stored size: 352 Bytes

Contents

class Array
  def wildcard_match?(other)
    return false unless other.is_a?(Array)
    return false unless size == other.size

    each_with_index do |value, i|
      if value.respond_to?(:wildcard_match?)
        return false unless value.wildcard_match?(other[i])
      else
        return false unless value == other[i]
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rr-3.1.1 lib/rr/core_ext/array.rb
rr-3.1.0 lib/rr/core_ext/array.rb
rr-3.0.9 lib/rr/core_ext/array.rb
rr-3.0.8 lib/rr/core_ext/array.rb
rr-3.0.7 lib/rr/core_ext/array.rb
rr-3.0.6 lib/rr/core_ext/array.rb
rr-3.0.5 lib/rr/core_ext/array.rb
rr-3.0.4 lib/rr/core_ext/array.rb
rr-3.0.3 lib/rr/core_ext/array.rb
rr-3.0.2 lib/rr/core_ext/array.rb
rr-3.0.1 lib/rr/core_ext/array.rb
rr-3.0.0 lib/rr/core_ext/array.rb
rr-1.2.1 lib/rr/core_ext/array.rb
rr-1.2.0 lib/rr/core_ext/array.rb