Sha256: 60fa04795c10ea20077bf19459a1c77e29658f30f1d5d3d42ea80b71eb0246eb
Contents?: true
Size: 440 Bytes
Versions: 15
Compression:
Stored size: 440 Bytes
Contents
# == Synopsis # add a blank? method to all Objects class Object # return asserted if object is nil or empty # TODO: not the safest coding, probably should dup before stripping. Maybe should also compact def blank? result = nil? unless result if respond_to? 'empty?' if respond_to? 'strip' result = strip.empty? else result = empty? end end end result end end
Version data entries
15 entries across 15 versions & 2 rubygems