mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 11:20:57 -06:00
14 lines
277 B
Ruby
14 lines
277 B
Ruby
|
# 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
|