# File lib/callsite.rb, line 108 def add_current self << __DIR_REL__(caller.first) end
# File lib/callsite.rb, line 112 def add_current! self.unshift(__DIR_REL__(caller.first)) end
# File lib/callsite.rb, line 96 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/callsite.rb, line 91 def find_file(file) find_all_files(file){|f| return f} nil end