Sha256: 7e920f06269f114c1d4e9a8b097da2a779372c92d992402dcdc3e0f283ee5565

Contents?: true

Size: 493 Bytes

Versions: 24

Compression:

Stored size: 493 Bytes

Contents

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

    def xslt_path(template_name)
      File.join(Htmltoooxml.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

24 entries across 24 versions & 1 rubygems

Version Path
htmltoooxml-0.1.3 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.1.2 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.1.1 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.1.0 lib/htmltoooxml/helpers/xslt_helper.rb