Sha256: 217de19e184ae88161a0a2fe2a7284580e9e32d051dbdf319cdd99dbb98c21e1

Contents?: true

Size: 349 Bytes

Versions: 6

Compression:

Stored size: 349 Bytes

Contents


#in lib/core_extensions.rb
class Hash
  
  ###
  ## So far the shit has been unnecessary
  ###
  
  #pass single or array of keys, which will be removed, returning the remaining hash
  def remove!(*keys)
    keys.each{|key| self.delete(key) }
    self
  end

  #non-destructive version
  def remove(*keys)
    self.dup.remove!(*keys)
  end
  
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
ish_lib-0.0.8 lib/core_extensions.rb
ish_lib_engine-0.0.5 lib/core_extensions.rb
ish_lib_engine-0.0.3 lib/core_extensions.rb
ish_lib_engine-0.0.2 lib/core_extensions.rb
ish_lib_engine-0.0.1 lib/core_extensions.rb
ish_lib-0.0.3 lib/core_extensions.rb