    # File lib/yard/handlers/base.rb, line 388
          def register(*objects)
            objects.flatten.each do |object|
              next unless object.is_a?(CodeObjects::Base)

              begin
                ensure_loaded!(object.namespace)
                object.namespace.children << object
              rescue NamespaceMissingError
              end

              # Yield the object to the calling block because ruby will parse the syntax
              #
              #     register obj = ClassObject.new {|o| ... }
              #
              # as the block for #register. We need to make sure this gets to the object.
              yield(object) if block_given?

              object.add_file(parser.file, statement.line, statement.comments)

              # Add docstring if there is one.
              if statement.comments
                object.docstring = Docstring.new(statement.comments, object)
              end

              # Expand/create any @macro tags
              expand_macro(object, find_or_create_macro(object))

              # Add hash_flag/line_range
              if statement.comments
                object.docstring.hash_flag = statement.comments_hash_flag
                object.docstring.line_range = statement.comments_range
              end

              # Add group information
              if statement.group
                unless object.namespace.is_a?(Proxy)
                  object.namespace.groups |= [statement.group]
                end
                object.group = statement.group
              end

              # Add transitive tags
              Tags::Library.transitive_tags.each do |tag|
                next if object.namespace.is_a?(Proxy)
                next unless object.namespace.has_tag?(tag)
                next if object.has_tag?(tag)
                object.docstring.add_tag(*object.namespace.tags(tag))
              end

              # Add source only to non-class non-module objects
              unless object.is_a?(NamespaceObject)
                object.source ||= statement
              end

              # Make it dynamic if its owner is not its namespace.
              # This generally means it was defined in a method (or block of some sort)
              object.dynamic = true if owner != namespace
            end
            objects.size == 1 ? objects.first : objects
          end