Sha256: 41b17386b15254bbae971b2abac23a27a8e864d6901d649d3fb2f83a31eb1600

Contents?: true

Size: 116 Bytes

Versions: 5

Compression:

Stored size: 116 Bytes

Contents

class Hash
  def compact
    select { |_,v| !v.nil? }
  end

  def compact!
    select! { |_,v| !v.nil? }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
moblues-0.4.0 lib/extensions/hash.rb
moblues-0.3.0 lib/extensions/hash.rb
moblues-0.2.0 lib/extensions/hash.rb
moblues-0.1.0 lib/extensions/hash.rb
moblues-0.0.1 lib/extensions/hash.rb