class Array

Public Instance Methods

wildcard_match?(other) click to toggle source
# File lib/rr/core_ext/array.rb, line 2
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