Class: DocumentExporter::Pdf::Base
- Inherits:
-
Base
- Object
- Base
- DocumentExporter::Pdf::Base
show all
- Defined in:
- lib/document_exporter/pdf/base.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#included_materials, #initialize, #ordered_materials, pdf_key
Class Method Details
.s3_folder ⇒ Object
6
7
8
|
# File 'lib/document_exporter/pdf/base.rb', line 6
def self.s3_folder
@s3_folder ||= ENV.fetch('SWAP_DOCS', 'documents')
end
|
Instance Method Details
#export ⇒ Object
10
11
12
|
# File 'lib/document_exporter/pdf/base.rb', line 10
def export
WickedPdf.new.pdf_from_string(pdf_content, pdf_params)
end
|
#pdf_content ⇒ Object
14
15
16
17
|
# File 'lib/document_exporter/pdf/base.rb', line 14
def pdf_content
content = render_template template_path('show'), layout: 'lcms/engine/cg_pdf'
content.gsub(/(___+)/, '<span class="o-od-compress-underscore">\1</span>')
end
|