def lookup_path_direct(namespace, path, type)
      result = namespace.root? && validate(@registry.at(path), type)
      return result if result

      if path =~ /\A(#{separators_match})/
        return validate(@registry.at(namespace.path + path), type)
      end

      separators.each do |sep|
        result = validate(@registry.at(namespace.path + sep + path), type)
        return result if result
      end

      nil
    end
def lookup_path_direct(namespace, path, type)
      result = namespace.root? && validate(@registry.at(path), type)
      return result if result

      if path =~ /\A(#{separators_match})/
        return validate(@registry.at(namespace.path + path), type)
      end

      separators.each do |sep|
        result = validate(@registry.at(namespace.path + sep + path), type)
        return result if result
      end

      nil
    end
Performs a lexical lookup from a namespace for a path and a type hint.