Sha256: 4af46b9b98d1aab081b22f833d43379a062610648d24568ce70e94cbfbf86392
Contents?: true
Size: 364 Bytes
Versions: 25
Compression:
Stored size: 364 Bytes
Contents
require 'gorillib/object/blank' class Array # # remove all key-value pairs where the value is blank # def compact_blank reject{|val| val.blank? } end unless method_defined?(:compact_blank) # # Replace the array with its compact_blank'ed self # def compact_blank! replace(compact_blank) end unless method_defined?(:compact_blank!) end
Version data entries
25 entries across 25 versions & 1 rubygems