Sha256: 299fc686fbf846df5e468ecf01041ea26e8ec182a13faf0ab33bc165bbb5b20f

Contents?: true

Size: 485 Bytes

Versions: 36

Compression:

Stored size: 485 Bytes

Contents

module Avv2word
  module XSLTHelper
    def document_xslt(extras = false)
      file_name = extras ? 'avv2word' : 'base'
      xslt_path(file_name)
    end

    def xslt_path(template_name)
      File.join(Avv2word.config.default_xslt_path, "#{template_name}.xslt")
    end

    def xslt(stylesheet_name: nil, stylesheet_path: nil)
      return Nokogiri::XSLT(File.open(stylesheet_path)) if stylesheet_path
      Nokogiri::XSLT(File.open(xslt_path(stylesheet_name)))
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
avv2word-1.1.39 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.38 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.37 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.36 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.35 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.34 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.33 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.32 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.31 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.30 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.29 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.28 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.27 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.26 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.25 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.24 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.23 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.22 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.21 lib/avv2word/helpers/xslt_helper.rb
avv2word-1.1.20 lib/avv2word/helpers/xslt_helper.rb