2021-01-20 13:45:05 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-01-04 22:05:42 +01:00
|
|
|
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
|