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

Instance Method Details

#imdb_strip_tagsObject

Strip tags



11
12
13
# File 'lib/ofdb/string_extensions.rb', line 11

def imdb_strip_tags
  gsub(/<\/?[^>]*>/, "")
end

#imdb_unescape_htmlObject

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