lib/yard/lib/yard/registry.rb
def partial_resolve(namespace, name, type = nil)
        obj = at(name) || at('#' + name) if namespace.root?
        return obj if obj && (type.nil? || obj.type == type)
        [CodeObjects::NSEP, CodeObjects::CSEP, ''].each do |s|
          next if s.empty? && name =~ /^\w/
          path = name
          if namespace != root
            path = [namespace.path, name].join(s)
          end
          found = at(path)
          return found if found && (type.nil? || found.type == type)
        end
        nil
      end
# Attempts to resolve a name in a namespace
#
# @param [CodeObjects::NamespaceObject] namespace the starting namespace
# @param [String] name the name to look for
# @param [Symbol, nil] type the {CodeObjects::Base#type} that the resolved
#   object must be equal to
Attempts to resolve a name in a namespace
Attempts to resolve a name in a namespace
def partial_resolve(namespace, name, type = nil)
        obj = at(name) || at('#' + name) if namespace.root?
        return obj if obj && (type.nil? || obj.type == type)
        [CodeObjects::NSEP, CodeObjects::CSEP, ''].each do |s|
          next if s.empty? && name =~ /^\w/
          path = name
          if namespace != root
            path = [namespace.path, name].join(s)
          end
          found = at(path)
          return found if found && (type.nil? || found.type == type)
        end
        nil
      end
def partial_resolve ( namespace , name , type = nil ) obj = at ( name ) || at ( '#' + name ) if namespace . root? return obj if obj && ( type . nil? || obj . type == type ) [ CodeObjects :: NSEP , CodeObjects :: CSEP , '' ] . each do | s | next if s . empty? && name =~ / ^ \w / path = name if namespace != root path = [ namespace . path , name ] . join ( s ) end found = at ( path ) return found if found && ( type . nil? || found . type == type ) end nil end
Attempts to resolve a name in a namespace
Attempts to resolve a name in a namespace
namespace
name
type
type the {CodeObjects::Base#type} that the resolved object must be equal to
type the { CodeObjects :: Base#type } that the resolved object must be equal to