Class: Rad::Template::RelativePathResolver

Inherits:
Object
  • Object
show all
Defined in:
lib/rad/template/_relative_path_resolver.rb

Instance Method Summary collapse

Instance Method Details

#find_relative_template(tname, prefixes, format, exact_format, current_dir) ⇒ Object



2
3
4
5
6
# File 'lib/rad/template/_relative_path_resolver.rb', line 2

def find_relative_template tname, prefixes, format, exact_format, current_dir
  raise "You can't use relative template path '#{tname}' without :current_dir!" unless current_dir
  prefixes = prefixes || rad.template.prefixes
  rad.template.find_file("/#{tname}", prefixes, format, exact_format, [current_dir])
end