I want to send a message to a ruby string object that tests for no_content:
"".content? => false # same as .empty?
" ".content? => false # same as .blank?
"\n\t".content? => false # new feature
Specifically, content? would pass true if there is anything a person could read there. I am going to monkey patch the String class to do this with a regular expression.
"\n\t\n\n".gsub(/[\n|\t]/,'').empty?
This gets me close, but I might be re-inventing the wheel and would like a more complete solution.
Check out
present?in ActiveSupport.