Skip to main content
deleted 4 characters in body
Source Link
MrYoshiji
  • 54.9k
  • 13
  • 130
  • 120

Fire up a monkey patch?

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 
Source Link
tadman
  • 212.4k
  • 23
  • 237
  • 266

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