module Precious::Views::TemplateCascade
Public Instance Methods
first_path_available(name)
click to toggle source
# File lib/gollum/views/template_cascade.rb, line 13 def first_path_available(name) default = File.join(template_path, "#{name}.#{template_extension}") priority = if template_priority_path File.join(template_priority_path, "#{name}.#{template_extension}") end priority && File.exist?(priority) ? priority : default end
template_file()
click to toggle source
Method should track lib/mustache/settings.rb from Mustache project.
# File lib/gollum/views/template_cascade.rb, line 24 def template_file @template_file || first_path_available(template_name) end
template_priority_path()
click to toggle source
# File lib/gollum/views/template_cascade.rb, line 4 def template_priority_path @@template_priority_path ||= nil end
template_priority_path=(path)
click to toggle source
# File lib/gollum/views/template_cascade.rb, line 8 def template_priority_path=(path) @@template_priority_path = File.expand_path(path) @template = nil end