EvoBal/app/services/html_to_text/nokogiri.rb

12 lines
214 B
Ruby

module HtmlToText
class Nokogiri < Base
def convert(html_input)
::Nokogiri::HTML(html_input).text
rescue Exception, ex
raise Error, "Error using Nokogiri : #{ex.message}"
end
end
end