Module: Ofdb::StringExtensions
- Defined in:
- lib/ofdb/string_extensions.rb
Overview
borrowed form the imdb-gem of github.com/ariejan/imdb/
Instance Method Summary collapse
-
#imdb_strip_tags ⇒ Object
Strip tags.
-
#imdb_unescape_html ⇒ Object
Unescape HTML.
Instance Method Details
#imdb_strip_tags ⇒ Object
Strip tags
11 12 13 |
# File 'lib/ofdb/string_extensions.rb', line 11 def gsub(/<\/?[^>]*>/, "") end |
#imdb_unescape_html ⇒ Object
Unescape HTML
6 7 8 |
# File 'lib/ofdb/string_extensions.rb', line 6 def imdb_unescape_html Iconv.conv("UTF-8", 'ISO-8859-1', CGI::unescapeHTML(self)) end |