Module: ImdbCelebrity::StringExtensions
- Defined in:
- lib/imdb_celebrity/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.
18 19 20 |
# File 'lib/imdb_celebrity/string_extensions.rb', line 18 def blank? strip.empty? end |
#imdb_strip_tags ⇒ Object
Strip tags
13 14 15 |
# File 'lib/imdb_celebrity/string_extensions.rb', line 13 def gsub(/<\/?[^>]*>/, "") end |
#imdb_unescape_html ⇒ Object
Unescape HTML
8 9 10 |
# File 'lib/imdb_celebrity/string_extensions.rb', line 8 def imdb_unescape_html Iconv.conv("UTF-8", 'ISO-8859-1', CGI::unescapeHTML(self)) end |