Sha256: ca09370ab882593e30d050db2edeb14d3a096ce37a64acdb416a3fbfa4cc0509
Contents?: true
Size: 343 Bytes
Versions: 2
Compression:
Stored size: 343 Bytes
Contents
class Object def blank? nil? || (respond_to?(:empty?) && empty?) end end class Fixnum def blank? false end end class NilClass def blank? true end end class TrueClass def blank? false end end class FalseClass def blank? false end end class String def blank? empty? || self =~ /^\s*$/ end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
datamapper-0.1.1 | lib/data_mapper/support/blank.rb |
datamapper-0.2.0 | lib/data_mapper/support/blank.rb |