Module: Myimdb::Scraper::StringExtensions
- Included in:
- Base
- Defined in:
- lib/myimdb/scraper/string_extensions.rb
Instance Method Summary collapse
Instance Method Details
#scraper_unescape_html(string) ⇒ Object
7 8 9 |
# File 'lib/myimdb/scraper/string_extensions.rb', line 7 def scraper_unescape_html(string) Iconv.conv("UTF-8", 'ISO-8859-1', CGI::unescapeHTML(string)) end |
#strip_useless_chars(string) ⇒ Object
11 12 13 |
# File 'lib/myimdb/scraper/string_extensions.rb', line 11 def strip_useless_chars(string) string.gsub(/[^a-zA-z0-9\|\-_\(\)@$\/\\ ,\.]/, '') end |