Sha256: 972666840cda44b3686081a7b20d36df0b43eff98fa220f8c252f9158b7c5774
Contents?: true
Size: 408 Bytes
Versions: 30
Compression:
Stored size: 408 Bytes
Contents
# frozen_string_literal: true module Refinements module Shared module Enumerables # Provides shared functionality for knowing whether an enumerable has many elements or not. module Many def many? return size > 1 unless block_given? total = reduce(0) { |count, item| yield(item) ? count + 1 : count } total > 1 end end end end end
Version data entries
30 entries across 30 versions & 1 rubygems