Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/wcc.rb

Instance Method Summary collapse

Instance Method Details

#strip_htmlString

Remove all HTML tags with at least one character name and decode all HTML entities into utf-8 characters.

Returns:

  • (String)

    stripped string



31
32
33
# File 'lib/wcc.rb', line 31

def strip_html
	HTMLEntities.new.decode(self.gsub(/<[^>]+>/, ' '))
end