# File lib/cgi.rb, line 1639 def html(attributes = {}) # :yield: if nil == attributes attributes = {} elsif "PRETTY" == attributes attributes = { "PRETTY" => true } end pretty = attributes.delete("PRETTY") pretty = " " if true == pretty buf = "" if attributes.has_key?("DOCTYPE") if attributes["DOCTYPE"] buf += attributes.delete("DOCTYPE") else attributes.delete("DOCTYPE") end else buf += doctype end if block_given? buf += super(attributes){ yield } else buf += super(attributes) end if pretty CGI::pretty(buf, pretty) else buf end end