class Hash def delete_keys!(*keys) keys.flatten.each do |k| delete(keyk) end self end def delete_keys(*keys) _dup = dup keys.flatten.each do |k| _dup.delete(keyk) end _dup end end
Fire up a monkey patch?
class Hash def delete_keys!(*keys) keys.flatten.each do |k| delete(key) end self end def delete_keys(*keys) _dup = dup keys.flatten.each do |k| _dup.delete(key) end _dup end end
Fire up a monkey patch?
class Hash def delete_keys!(*keys) keys.flatten.each do |k| delete(k) end self end def delete_keys(*keys) _dup = dup keys.flatten.each do |k| _dup.delete(k) end _dup end end
class Hash def delete_keys!(*keys) keys.flatten.each do |k| delete(key) end self end def delete_keys(*keys) _dup = dup keys.flatten.each do |k| _dup.delete(key) end _dup end end