Flowdock
method

compact!

Importance_1
v2_4_6 - Show latest stable - 0 notes - Class: Hash
compact!() public

Removes all nil values from the hash. Returns the hash.

h = { a: 1, b: false, c: nil }
h.compact!     #=> { a: 1, b: false }
Show source
Register or log in to add new notes.