Method: RDoc::Markup::PreProcess#find_include_file

Defined in:
lib/rdoc/markup/pre_process.rb

#find_include_file(name) ⇒ Object

Look for the given file in the directory containing the current file, and then in each of the directories specified in the RDOC_INCLUDE path



308
309
310
311
312
313
314
315
316
# File 'lib/rdoc/markup/pre_process.rb', line 308

def find_include_file(name)
  to_search = [File.dirname(@input_file_name)].concat @include_path
  to_search.each do |dir|
    full_name = File.join(dir, name)
    stat = File.stat(full_name) rescue next
    return full_name if stat.readable?
  end
  nil
end