    # File lib/yard/code_objects/proxy.rb, line 28
          def initialize(namespace, name)
            namespace = Registry.root if !namespace || namespace == :root

            if name =~ /^#{NSEPQ}/
              namespace = Registry.root
              name = name[2..-1]
            end

            if name =~ /(?:#{NSEPQ}|#{ISEPQ}|#{CSEPQ})([^#{NSEPQ}#{ISEPQ}#{CSEPQ}]+)$/
              @orignamespace, @origname = namespace, name
              @imethod = true if name.include? ISEP
              namespace = Proxy.new(namespace, $`) unless $`.empty?
              name = $1
            else
              @orignamespace, @origname, @imethod = nil, nil, nil
            end

            @name = name.to_sym
            @namespace = namespace
            @obj = nil
            @imethod ||= nil

            if @namespace.is_a?(ConstantObject)
              @origname = nil # forget these for a constant
              @orignamespace = nil
              @namespace = Proxy.new(@namespace.namespace, @namespace.value)
            end

            unless @namespace.is_a?(NamespaceObject) or @namespace.is_a?(Proxy)
              raise ArgumentError, "Invalid namespace object: #{namespace}"
            end

            # If the name begins with "::" (like "::String")
            # this is definitely a root level object, so
            # remove the namespace and attach it to the root
            if @name =~ /^#{NSEPQ}/
              @name.gsub!(/^#{NSEPQ}/, '')
              @namespace = Registry.root
            end
          end