# File lib/loaders/load_path.rb, line 27 def add(path) push(path) unless include?(path) end
# File lib/loaders/load_path.rb, line 31 def add!(path) delete(path) unshift(path) end
# File lib/loaders/load_path.rb, line 19 def add_current add(__DIR_REL__(caller.first)) end
# File lib/loaders/load_path.rb, line 23 def add_current! add!(__DIR_REL__(caller.first)) end
# File lib/loaders/load_path.rb, line 7 def find_all_files(file, ext = nil) file += ext if ext and File.extname(file) != ext inject([]){|ary, path| target = File.expand_path(file, path) if File.readable?(target) ary << target yield target if block_given? end ary } end
# File lib/loaders/load_path.rb, line 2 def find_file(file) find_all_files(file){|f| return f} nil end