Sha256: c2b1cde60a3bd346606b85c65adecab733ad2e40047a99bbef42cfc55321e902

Contents?: true

Size: 383 Bytes

Versions: 11

Compression:

Stored size: 383 Bytes

Contents

class Hash
  # Returns the value of self for each argument and deletes those entries.
  #
  # ==== Parameters
  # *args:: the keys whose values should be extracted and deleted.
  #
  # ==== Returns
  # Array[Object]:: The values of the provided arguments in corresponding order.
  #
  # @api public
  def extract!(*args)
    args.map do |arg|
      self.delete(arg)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/merb-core-0.9.14/lib/merb-core/core_ext/hash.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/merb-core-0.9.14/lib/merb-core/core_ext/hash.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/merb-core-0.9.14/lib/merb-core/core_ext/hash.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/merb-core-0.9.14/lib/merb-core/core_ext/hash.rb
merb-core-1.1.0.rc1 spec10/public/webrat/test_app/gems/gems/merb-core-0.9.14/lib/merb-core/core_ext/hash.rb
merb-core-1.1.0.pre spec10/public/webrat/test_app/gems/gems/merb-core-0.9.14/lib/merb-core/core_ext/hash.rb
merb-core-0.9.10 lib/merb-core/core_ext/hash.rb
merb-core-0.9.11 lib/merb-core/core_ext/hash.rb
merb-core-0.9.13 lib/merb-core/core_ext/hash.rb
merb-core-0.9.12 lib/merb-core/core_ext/hash.rb
merb-core-0.9.9 lib/merb-core/core_ext/hash.rb