Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/scrappy/support.rb
Instance Method Summary collapse
-
#equivalent?(array) ⇒ Boolean
Return true if a given array has the same elements as this one.
Instance Method Details
#equivalent?(array) ⇒ Boolean
Return true if a given array has the same elements as this one
36 37 38 39 |
# File 'lib/scrappy/support.rb', line 36 def equivalent? array self.all? { |i| array.include?(i) } and array.all? { |i| self.include?(i) } end |