Sha256: 9d43ffd216c3057590ce683274d21c947942c8f687abbad0559d5d6b12d5d124
Contents?: true
Size: 335 Bytes
Versions: 10
Compression:
Stored size: 335 Bytes
Contents
# frozen_string_literal: true module CoreExtensions # Extension of Ruby's standard library +Hash+ class. module Hash # Returns a copy of a hash with +keys+ excluded. Original hash is not # modified. # @return [Hash] def except(*keys) h = dup keys.each { |key| h.delete(key) } h end end end
Version data entries
10 entries across 10 versions & 1 rubygems