Sha256: 75572bbc962c78e455698bb13978315d4fa0b7862d14d633b193fbcf6df6cb7e
Contents?: true
Size: 253 Bytes
Versions: 1
Compression:
Stored size: 253 Bytes
Contents
# frozen_string_literal: true class Array # @param threshold [Integer] default 1 # @return [Array] excluding items that appear more than `threshold` times def find_dupes(threshold = 1) select { |item| count(item) > threshold }.uniq end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
find_dupes_extension-0.0.1 | lib/find_dupes_extension.rb |