# File lib_doc/rucy/sample.rb, line 42
    def publish(script_name, request, response, logger)
      logger.debug("[#{Time.now.httpdate}] enter document: #{self.class}")
      case (request.method)
      when 'GET', 'HEAD'
        response.status = 200  # OK
        response.set_header('Content-Type', 'text/html')
        response.start_body
        if (request.method != 'HEAD') then
          response << "<html>\n"
          response << "<head><title>Document Parameter Sample</title></head>\n"
          response << "<body>\n"
          response << "<h1>Document Parameter Sample</h1>\n"
          response << "<h2>1. string</h2>\n"
          response << "<pre>#{escapeHTML(@string)}</pre>\n"
          response << "<h2>2. password</h2>\n"
          response << "<pre>#{escapeHTML(@password.inspect)}</pre>\n"
          response << "<h2>3. text</h2>\n"
          response << "<pre>#{escapeHTML(@text)}</pre>\n"
          response << "<h2>4. number</h2>\n"
          response << "<pre>#{escapeHTML(@number.to_s)}</pre>\n"
          response << "<h2>5. regexp</h2>\n"
          response << "<pre>#{escapeHTML(@regexp.inspect)}</pre>\n"
          response << "<h2>6. boolean</h2>\n"
          response << "<pre>#{escapeHTML(@bool.to_s)}</pre>\n"
          response << "<h2>7. select</h2>\n"
          response << "<pre>#{escapeHTML(@select)}</pre>\n"
          response << "<h2>8. radio</h2>\n"
          response << "<pre>#{escapeHTML(@radio)}</pre>\n"
          response << "<h2>9. checkset</h2>\n"
          response << "<pre>#{escapeHTML(@checkset.inspect)}</pre>\n"
          response << "</body>\n"
          response << "</html>\n"
        end
      else
        http_error = HTTPError.new(405) # Method Not Allowed
        http_error.set_header('Allow', 'GET, HEAD')
        raise http_error
      end
      nil
    end