Sha256: f064493b6866f2350c48bbba050b19f7e193eddd6b437d3f8253e5ac1a843128

Contents?: true

Size: 134 Bytes

Versions: 16

Compression:

Stored size: 134 Bytes

Contents

class Hash

  ##
  # Remove nil and empty keys.
  #
  def compact
    delete_if { |key, value| value.nil? || value.empty? }
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fesplugas-typus-0.9.0 lib/typus/hash.rb
fesplugas-typus-0.9.1 lib/typus/hash.rb
fesplugas-typus-0.9.10 lib/typus/hash.rb
fesplugas-typus-0.9.11 lib/typus/hash.rb
fesplugas-typus-0.9.12 lib/typus/hash.rb
fesplugas-typus-0.9.13 lib/typus/hash.rb
fesplugas-typus-0.9.14 lib/typus/hash.rb
fesplugas-typus-0.9.15 lib/typus/hash.rb
fesplugas-typus-0.9.2 lib/typus/hash.rb
fesplugas-typus-0.9.3 lib/typus/hash.rb
fesplugas-typus-0.9.4 lib/typus/hash.rb
fesplugas-typus-0.9.5 lib/typus/hash.rb
fesplugas-typus-0.9.6 lib/typus/hash.rb
fesplugas-typus-0.9.7 lib/typus/hash.rb
fesplugas-typus-0.9.8 lib/typus/hash.rb
fesplugas-typus-0.9.9 lib/typus/hash.rb