Module: Imdb::StringExtensions
- Defined in:
- lib/imdb/string_extensions.rb
Instance Method Summary collapse
-
#blank? ⇒ Boolean
Strips out whitespace then tests if the string is empty.
-
#imdb_strip_tags ⇒ Object
Strip tags.
-
#imdb_unescape_html ⇒ Object
Unescape HTML.
Instance Method Details
#blank? ⇒ Boolean
Strips out whitespace then tests if the string is empty.
19 20 21 |
# File 'lib/imdb/string_extensions.rb', line 19 def blank? strip.empty? end |
#imdb_strip_tags ⇒ Object
Strip tags
14 15 16 |
# File 'lib/imdb/string_extensions.rb', line 14 def gsub(/<\/?[^>]*>/, "") end |
#imdb_unescape_html ⇒ Object
Unescape HTML
9 10 11 |
# File 'lib/imdb/string_extensions.rb', line 9 def imdb_unescape_html Iconv.conv("UTF-8", 'ISO-8859-1', CGI::unescapeHTML(self)) end |