Sha256: 7e920f06269f114c1d4e9a8b097da2a779372c92d992402dcdc3e0f283ee5565

Contents?: true

Size: 493 Bytes

Versions: 23

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

23 entries across 23 versions & 1 rubygems

Version Path
htmltoooxml-0.4.0 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.3.9 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.3.8 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.3.7 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.3.6 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.3.5 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.3.4 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.3.3 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.3.2 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.3.1 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.3.0 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.2.1 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.2.0 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.1.9 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.1.8 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.1.7 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.1.6 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.1.5 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.1.4 lib/htmltoooxml/helpers/xslt_helper.rb
htmltoooxml-0.1.3 lib/htmltoooxml/helpers/xslt_helper.rb