1 # Copyright (c) 2010 Paolo Capriotti <p.capriotti@gmail.com>
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
11 def self.start(basedir)
13 warn "AutoReload already started"
15 @notifier = new(File.expand_path(basedir))
19 def initialize(basedir)
20 @watch = KDE::DirWatch.new
21 @watch.add_dir(basedir, KDE::DirWatch::WatchSubDirs)
22 @watch.on(:dirty) do |filename|
23 if filename =~ /\.rb$/
24 warn "reloading #{filename}"