Sha256: f18f6707b8d56afc7837f5952486ad5f64d302a103bca8743d8e8608d3add9d3

Contents?: true

Size: 384 Bytes

Versions: 36

Compression:

Stored size: 384 Bytes

Contents

module Avv2word
  module TemplatesHelper
    def template_file(template_file_name = nil)
      default_path = File.join(::Avv2word.config.default_templates_path, 'default.docx')
      template_path = template_file_name.nil? ? '' : File.join(::Avv2word.config.custom_templates_path, template_file_name)
      File.exist?(template_path) ? template_path : default_path
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

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