Takes a relative or absolute file name, a couple possible paths that the file might reside in. Returns the full path and File::Stat for the path.
# File lib/rack/reloader.rb, line 84
84: def figure_path(file, paths)
85: found = @cache[file]
86: found = file if !found and Pathname.new(file).absolute?
87: found, stat = safe_stat(found)
88: return found, stat if found
89:
90: paths.each do |possible_path|
91: path = ::File.join(possible_path, file)
92: found, stat = safe_stat(path)
93: return ::File.expand_path(found), stat if found
94: end
95: end
(Not documented)
# File lib/rack/reloader.rb, line 65
65: def rotation
66: files = [$0, *$LOADED_FEATURES].uniq
67: paths = ['./', *$LOAD_PATH].uniq
68:
69: files.map{|file|
70: next if file =~ /\.(so|bundle)$/ # cannot reload compiled files
71:
72: found, stat = figure_path(file, paths)
73: next unless found and stat and mtime = stat.mtime
74:
75: @cache[file] = found
76:
77: yield(found, mtime)
78: }.compact
79: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.