Sha256: a8c903c4fdff52c1421d16b2e3d9233e346afec415f298a0405d0c67f67965b4
Contents?: true
Size: 503 Bytes
Versions: 4
Compression:
Stored size: 503 Bytes
Contents
# frozen_string_literal: true require 'pandoc-ruby' module DocumentExporter class Docx def initialize(document) @document = document end def export PandocRuby.convert content, from: :html, to: :docx end private def content # Using backport of Rails 5 Renderer here @content ||= ApplicationController.render( layout: 'ld_docx', locals: { :@document => @document }, template: 'documents/docx/export' ) end end end
Version data entries
4 entries across 4 versions & 1 rubygems