lib/cutaneous/loader.rb in cutaneous-0.2.0 vs lib/cutaneous/loader.rb in cutaneous-0.3.0
- old
+ new
@@ -37,20 +37,20 @@
Lexer.new(template, syntax)
end
def path(template_name)
filename = filename(template_name)
- return filename if ::File.exists?(filename) # Test for an absolute path
- @roots.map { |root| ::File.join(root, filename)}.detect { |path| ::File.exists?(path) }
+ return filename if ::File.exist?(filename) # Test for an absolute path
+ @roots.map { |root| ::File.join(root, filename)}.detect { |path| ::File.exist?(path) }
end
def filename(template_name)
[template_name, @format, @extension].join(".")
end
def exists?(template_root, template_name)
path = ::File.join(template_root, filename(template_name))
- ::File.exists?(path)
+ ::File.exist?(path)
end
def location(template_root, template_name)
return ::File.join(template_root, template_name) if exists?(template_root, template_name)
nil