Sha256: 6700cb9a1aa3c5447d22636a8c58a1844d4cfd5b41402b82bed084e59c2843a1
Contents?: true
Size: 482 Bytes
Versions: 27
Compression:
Stored size: 482 Bytes
Contents
unless String.method_defined? :blank? class String # Checks whether a string is blank. A string is considered blank if it # is either empty or contains only whitespace characters. # # @return [Boolean] true is the string is blank, false otherwise # # @example # ''.blank? #=> true # # @example # ' '.blank? #=> true # # @example # ' test'.blank? #=> false def blank? empty? || strip.empty? end end end
Version data entries
27 entries across 24 versions & 6 rubygems