Module: Tins::Blank::String
- Defined in:
- lib/tins/xt/blank.rb
Overview
Blank behavior for String instances
Instance Method Summary collapse
-
#blank? ⇒ Boolean
Strings are blank if they contain only whitespace characters.
Instance Method Details
#blank? ⇒ Boolean
Strings are blank if they contain only whitespace characters. This uses a regex match against non-whitespace characters.
113 114 115 |
# File 'lib/tins/xt/blank.rb', line 113 def blank? self !~ /\S/ end |