Sha256: 8d59c0a5e12d948e17800c551dd0819a5554f6a35fc31079a11e7cb7ee2ec31d

Contents?: true

Size: 217 Bytes

Versions: 10

Compression:

Stored size: 217 Bytes

Contents

class Hash

  # In-place version of Hash#select.  The opposite of the built-in
  # Hash#reject!.
  #
  #   CREDIT Gavin Sinclair
  #   CREDIT Noah Gibbs

  def select!
    reject! { |k,v| not yield(k,v) }
  end

end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
facets-2.3.0 lib/core/facets/hash/select.rb
facets-2.4.0 lib/facets/hash/select.rb
facets-2.2.0 lib/core/facets/hash/select.rb
facets-2.2.1 lib/core/facets/hash/select.rb
facets-2.4.1 lib/facets/hash/select.rb
facets-2.4.2 lib/core/facets/hash/select.rb
facets-2.4.3 lib/core/facets/hash/select.rb
facets-2.4.4 lib/core/facets/hash/select.rb
facets-2.4.5 lib/core/facets/hash/select.rb
mack-facets-0.8.2 lib/gems/facets-2.4.5/lib/core/facets/hash/select.rb