Flowdock
method

compact_blank!

Importance_1
v6.1.3.1 - Show latest stable - 0 notes - Class: Array
compact_blank!() public

Removes all blank elements from the Array in place and returns self. Uses Object#blank? for determining if an item is blank.

a = [1, "", nil, 2, " ", [], {}, false, true]
a.compact_blank!
# =>  [1, 2, true]
Show source
Register or log in to add new notes.