9 @data = Archive.list_files(@path)
12 @times[info[0]] = info[1]
25 @data.each { |t| out << t.at(0) }
29 def last_modified(file)
30 if time = @times[file]
32 elsif file.suffix?(".rb")
33 return @times["#{file}c"]
39 def out_of_date?(file)
40 cur = last_modified(file)
41 return true unless cur
43 stat = File.stat(file)
47 def find_out_of_date(dir)
49 Dir["#{dir}/*.rb"].each do |file|
50 ood << file if out_of_date?(file)
55 def add_file(name, method)
56 # Save blah.rb as blah.rbc
57 if name.suffix?(".rb")
61 Archive.add_object @path, name, method
66 def refresh_file(file)
67 return false unless out_of_date?(file)
69 meth = Compile.compile_file(file)
73 def update_from_directory(dir)
74 added = find_out_of_date(dir)
76 yield file if block_given?
77 meth = Compile.compile_file(file)