class String
Public Instance Methods
blank?()
click to toggle source
A string is blank if it's empty or contains whitespaces only:
"".blank? # => true " ".blank? # => true " something here ".blank? # => false
# File lib/klipbook/util/blank.rb, line 9 def blank? self !~ /\S/ end