Sha256: 2059455f4dddb25783ce967a7f97c584823b92bb66525adeec5ad85342eeb98a
Contents?: true
Size: 314 Bytes
Versions: 15
Compression:
Stored size: 314 Bytes
Contents
# frozen_string_literal: true class Hash # Removes the given keys from hash and returns it. # hash = { a: true, b: false, c: nil } # hash.except!(:c) # => { a: true, b: false } # hash # => { a: true, b: false } def except!(*keys) keys.each { |key| delete(key) } self end end
Version data entries
15 entries across 15 versions & 3 rubygems