Module: Onebox::TemplateSupport

Included in:
Layout, View
Defined in:
lib/onebox/template_support.rb

Instance Method Summary collapse

Instance Method Details

#load_pathsObject


3
4
5
# File 'lib/onebox/template_support.rb', line 3

def load_paths
  Onebox.options.load_paths.select(&method(:template?))
end

#template?(path) ⇒ Boolean


7
8
9
# File 'lib/onebox/template_support.rb', line 7

def template?(path)
  File.exist?(File.join(path, "#{template_name}.#{template_extension}"))
end