Class: BreezyPDF::HTML2PDF
- Inherits:
-
Object
- Object
- BreezyPDF::HTML2PDF
- Defined in:
- lib/breezy_pdf/html_2_pdf.rb
Overview
Transform an HTML slug to a PDF Access it’s URL or download it locally and access it as a Tempfile
Instance Method Summary collapse
-
#initialize(asset_host, html_string, metadata = {}) ⇒ HTML2PDF
constructor
A new instance of HTML2PDF.
- #to_file ⇒ Object
- #to_url ⇒ Object
Constructor Details
#initialize(asset_host, html_string, metadata = {}) ⇒ HTML2PDF
Returns a new instance of HTML2PDF.
7 8 9 10 11 |
# File 'lib/breezy_pdf/html_2_pdf.rb', line 7 def initialize(asset_host, html_string, = {}) @asset_host = asset_host @html_string = html_string @metadata = end |
Instance Method Details
#to_file ⇒ Object
17 18 19 |
# File 'lib/breezy_pdf/html_2_pdf.rb', line 17 def to_file file end |
#to_url ⇒ Object
13 14 15 |
# File 'lib/breezy_pdf/html_2_pdf.rb', line 13 def to_url url end |