Sha256: 157c537a72a1180a42146c32f4862f80f9407eb51bb43ff9820c22305883f601
Contents?: true
Size: 331 Bytes
Versions: 11
Compression:
Stored size: 331 Bytes
Contents
class Hash alias :original_delete :delete # support delete more than one keys # # original: delete(key) # current: delete(*keys) # # return [Hash] def delete *keys, &blk values = keys.each.with_object [] do |k,m| m << original_delete(k, &blk) end keys.length==1 ? values[0] : values end end # class Hash
Version data entries
11 entries across 11 versions & 1 rubygems