Class: BreezyPDF::HTML::Strip

Inherits:
Object
  • Object
show all
Defined in:
lib/breezy_pdf/html/strip.rb

Overview

Replace assets with uploaded URL’s

Instance Method Summary collapse

Constructor Details

#initialize(html_fragment) ⇒ Strip

Returns a new instance of Strip.



6
7
8
# File 'lib/breezy_pdf/html/strip.rb', line 6

def initialize(html_fragment)
  @html_fragment = html_fragment
end

Instance Method Details

#stripped_fragmentObject



10
11
12
13
14
# File 'lib/breezy_pdf/html/strip.rb', line 10

def stripped_fragment
  @stripped_fragment ||= parsed_document.tap do
    strip!
  end.to_html
end