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.
17 18 19 |
# File 'lib/imdb/string_extensions.rb', line 17 def blank? strip.empty? end |
#imdb_strip_tags ⇒ Object
Strip tags
12 13 14 |
# File 'lib/imdb/string_extensions.rb', line 12 def gsub(/<\/?[^>]*>/, "") end |
#imdb_unescape_html ⇒ Object
Unescape HTML
7 8 9 |
# File 'lib/imdb/string_extensions.rb', line 7 def imdb_unescape_html CGI::unescapeHTML(self.encode("UTF-8")) end |