Class: String
- Includes:
- Buff::Extensions::String::Inflections
- Defined in:
- lib/buff/extensions/object/blank.rb,
lib/buff/extensions/string/inflections.rb
Instance Method Summary collapse
-
#blank? ⇒ Boolean
A string is blank if it’s empty or contains whitespaces only:.
Methods included from Buff::Extensions::String::Inflections
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
93 94 95 |
# File 'lib/buff/extensions/object/blank.rb', line 93 def blank? self !~ /[^[:space:]]/ end |