Class: RTF::Converters::HTML
- Inherits:
-
Object
- Object
- RTF::Converters::HTML
- Defined in:
- lib/rtf/converters/html.rb
Defined Under Namespace
Modules: Helpers Classes: Node, NodeSet
Instance Method Summary collapse
-
#initialize(html, options = {}) ⇒ HTML
constructor
A new instance of HTML.
- #to_rtf(options = {}) ⇒ Object
- #to_rtf_document(options = {}) ⇒ Object
Constructor Details
#initialize(html, options = {}) ⇒ HTML
Returns a new instance of HTML.
7 8 9 10 |
# File 'lib/rtf/converters/html.rb', line 7 def initialize(html, = {}) html = [:noclean] ? html : clean(html, [:tidy_options] || {}) @html = Nokogiri::HTML::Document.parse(html) end |
Instance Method Details
#to_rtf(options = {}) ⇒ Object
12 13 14 |
# File 'lib/rtf/converters/html.rb', line 12 def to_rtf( = {}) to_rtf_document().to_rtf end |