Module: Imdb::StringExtensions

Defined in:
lib/imdb/string_extensions.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/imdb/string_extensions.rb', line 16

def blank?
  strip.empty?
end

#imdb_strip_tagsObject

Strip tags



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

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

#imdb_unescape_htmlObject

Unescape HTML



6
7
8
# File 'lib/imdb/string_extensions.rb', line 6

def imdb_unescape_html
  CGI.unescapeHTML(encode('UTF-8'))
end