module StringExtensions

Public Instance Methods

blank?() click to toggle source

Strips out whitespace then tests if the string is empty.

# File lib/string_extensions.rb, line 15
def blank?
  strip.empty?
end
strip_tags() click to toggle source

Strip tags

# File lib/string_extensions.rb, line 10
def strip_tags
  gsub(/<\/?[^>]*>/, '')
end
unescape_html() click to toggle source

Unescape HTML

# File lib/string_extensions.rb, line 5
def unescape_html
  CGI.unescapeHTML(encode('UTF-8'))
end