Sha256: b19bfea306de42077773704878dfe4f3bd6d6363d441646643ca824bbe631c23
Contents?: true
Size: 515 Bytes
Versions: 19
Compression:
Stored size: 515 Bytes
Contents
class Object # copy from activesupport def blank? respond_to?(:empty?) ? empty? : !self end end class NilClass #:nodoc: def blank? true end end class FalseClass #:nodoc: def blank? true end end class TrueClass #:nodoc: def blank? false end end class Array #:nodoc: alias_method :blank?, :empty? end class Hash #:nodoc: alias_method :blank?, :empty? end class String #:nodoc: def blank? self !~ /\S/ end end class Numeric #:nodoc: def blank? false end end
Version data entries
19 entries across 19 versions & 3 rubygems