lib/yard/lib/yard/cli/yri.rb
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"
        if obj = try_load_object(name, nil)
          return obj
        end

        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)
          if obj = try_load_object(name, path)
            return obj
          end
        end
        nil
      end
# Locates an object by name starting in the cached paths and then
# searching through any search paths.
#
# @param [String] name the full name of the object
# @return [CodeObjects::Base] an object if found
# @return [nil] if no object is found
Locates an object by name starting in the cached paths and then
searching through any search paths.
Locates an object by name starting in the cached paths and then searching through any search paths .
def find_object(name)
        @search_paths.unshift(@cache[name]) if @cache[name]
        @search_paths.unshift(Registry.yardoc_file)
        log.debug "Searching for #{name} in memory"
        if obj = try_load_object(name, nil)
          return obj
        end
        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)
          if obj = try_load_object(name, path)
            return obj
          end
        end
        nil
      end
def find_object ( name ) @search_paths . unshift ( @cache [ name ] ) if @cache [ name ] @search_paths . unshift ( Registry . yardoc_file ) log . debug "Searching for #{name} in memory" if obj = try_load_object ( name , nil ) return obj end 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 ) if obj = try_load_object ( name , path ) return obj end end nil end
Locates an object by name starting in the cached paths and then
searching through any search paths.
Locates an object by name starting in the cached paths and then searching through any search paths .
# Try to load it from in memory cache
an object if found
an object if found
CodeObjects::Base
if no object is found
if no object is found
nil
name
name the full name of the object
name the full name of the object