Sha256: 1212f688a298355a0ac157b9b8341040bef34987c679ea3c227ee8c4218460be
Contents?: true
Size: 462 Bytes
Versions: 52
Compression:
Stored size: 462 Bytes
Contents
class Object def blank? respond_to?(:empty?) ? empty? : !self end end class NilClass def blank? true end end class FalseClass def blank? true end end class TrueClass def blank? false end end class Array alias_method :blank?, :empty? end class Hash alias_method :blank?, :empty? end class String BLANK_RE = /\A[[:space:]]*\z/ def blank? self =~ BLANK_RE end end class Numeric def blank? false end end
Version data entries
52 entries across 52 versions & 1 rubygems