# File lib/yard/handlers/ruby/dsl_handler_methods.rb, line 12
        def handle_comments
          return if IGNORE_METHODS[caller_method]

          @docstring = statement.comments || ""
          @docstring = @docstring.join("\n") if @docstring.is_a?(Array)

          attaching = false
          if @docstring =~ /^@!?macro\s+\[[^\]]*attach/
            register_docstring(nil)
            @docstring = ""
            attaching = true
          end

          if macro = find_attached_macro
            txt = macro.expand([caller_method, *call_params], statement.source)
            @docstring += "\n" + txt

            if !attaching && txt.match(/^\s*@!/) # macro has a directive
              return register_docstring(nil)
            end
          elsif !statement.comments_hash_flag && !implicit_docstring?
            return register_docstring(nil)
          end

          # ignore DSL definitions if @method/@attribute directive is used
          if @docstring =~ /^@!?(method|attribute)\b/
            return register_docstring(nil)
          end

          object = MethodObject.new(namespace, method_name, scope)
          object.signature = method_signature
          register(object)
        end