Module: Imdb::StringExtensions

Defined in:
lib/imdb/string_extensions.rb

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) blank?

Returns:

  • (Boolean)


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

def blank?
  strip.empty?
end

- (Object) imdb_strip_tags

Strip tags



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

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

- (Object) imdb_unescape_html

Unescape HTML



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

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