module YARD::Templates::Engine

def find_template_paths(from_template, path)

Returns:
  • (Array) - a list of full paths that are existing

Parameters:
  • path (String) -- the path component to search for in the
  • from_template (Template) -- if provided, allows a relative
def find_template_paths(from_template, path)
  paths = template_paths.dup
  paths = from_template.full_paths + paths if from_template
  paths.inject([]) do |acc, tp|
    full_path = File.cleanpath(File.join(tp, path))
    acc.unshift(full_path) if File.directory?(full_path)
    acc
  end.uniq
end