Sha256: 82914f0b7ff42fed6a200371b41123f50af321f32921f496b25c6718e1eefdd7
Contents?: true
Size: 179 Bytes
Versions: 10
Compression:
Stored size: 179 Bytes
Contents
class Array # Simplify an array by flattening it then compacting it. # # [1,[2,nil,[3]],nil,4].collapse #=> [1,2,3,4] # def collapse flatten.compact end end
Version data entries
10 entries across 9 versions & 1 rubygems