javascript finder

This commit is contained in:
John Bintz 2011-05-23 20:59:20 -04:00
parent 8c79c950f1
commit a0a8cf213b
1 changed files with 2 additions and 2 deletions

View File

@ -26,8 +26,8 @@ module Guard
end
end
class DSL
def matching_js_file(path)
class Dsl
def newest_js_file(path)
Dir[path + '*.{js,coffee}'].sort { |left, right| File.mtime(right) <=> File.mtime(left) }.first
end
end