Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/matchcase/array.rb

Instance Method Summary collapse

Instance Method Details

#===(other) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)


5
6
7
8
9
10
# File 'lib/matchcase/array.rb', line 5

def ===(other)
  return false unless other.is_a?(Array)
  each_with_index.all? do |item, index|
    item === other[index]
  end
end