discourse/lib/onebox/template_support.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
277 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Onebox
module TemplateSupport
def load_paths
Onebox.options.load_paths.select(&method(:template?))
end
def template?(path)
File.exist?(File.join(path, "#{template_name}.#{template_extension}"))
end
end
end