module RuboCop::Cop::Duplication
def duplicates?(collection)
-
(Boolean)
- whether the array contains any duplicates
Parameters:
-
collection
(Array
) -- an array to check for duplicates
def duplicates?(collection) collection.size > 1 && collection.size > collection.uniq.size end