提交 04623291 编写于 作者: X Xavier Noria

no need to have access to the listener

上级 c27caeec
......@@ -4,8 +4,6 @@
module ActiveSupport
class FileEventedUpdateChecker
attr_reader :listener
def initialize(files, dirs={}, &block)
@files = files.map {|f| expand_path(f)}.to_set
......@@ -18,8 +16,7 @@ def initialize(files, dirs={}, &block)
@modified = false
if (watch_dirs = base_directories).any?
@listener = Listen.to(*watch_dirs, &method(:changed))
@listener.start
Listen.to(*watch_dirs, &method(:changed)).start
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册