javascript finder

This commit is contained in:
John Bintz 2011-05-23 20:59:20 -04:00
parent 8c79c950f1
commit a0a8cf213b

View File

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