Class: String
Instance Method Summary collapse
-
#blank? ⇒ Boolean
A string is blank if it’s empty or contains whitespaces only:.
Instance Method Details
#blank? ⇒ Boolean
A string is blank if it’s empty or contains whitespaces only:
''.blank? # => true
' '.blank? # => true
' '.blank? # => true
' something here '.blank? # => false
94 95 96 |
# File 'lib/burr/core_ext/blank.rb', line 94 def blank? self !~ /[^[:space:]]/ end |