class YARD::CLI::YRI

def find_object(name)

Returns:
  • (nil) - if no object is found
  • (CodeObjects::Base) - an object if found

Parameters:
  • name (String) -- the full name of the object
def find_object(name)
  @search_paths.unshift(@cache[name]) if @cache[name]
  @search_paths.unshift(Registry.yardoc_file)
  # Try to load it from in memory cache
  log.debug "Searching for #{name} in memory"
  obj = try_load_object(name, nil)
  return obj if obj
  log.debug "Searching for #{name} in search paths"
  @search_paths.each do |path|
    next unless File.exist?(path)
    log.debug "Searching for #{name} in #{path}..."
    Registry.load(path)
    obj = try_load_object(name, path)
    return obj if obj
  end
  nil
end