From 0f201eb76fa0ac490ffbd39db3a3d4e12dee5560 Mon Sep 17 00:00:00 2001 From: Clinton R. Nixon Date: Wed, 18 May 2011 14:49:08 -0400 Subject: [PATCH] Adding documentation for CGI --- lib/cgi/core.rb | 6 ++++++ lib/cgi/util.rb | 8 ++++++++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/lib/cgi/core.rb b/lib/cgi/core.rb index 4a271d2..a756ab5 100644 --- a/lib/cgi/core.rb +++ b/lib/cgi/core.rb @@ -46,14 +46,17 @@ class CGI # :startdoc: + # Synonym for ENV. def env_table ENV end + # Synonym for $stdin. def stdinput $stdin end + # Synonym for $stdout. def stdoutput $stdout end @@ -705,14 +708,17 @@ class CGI @@accept_charset="UTF-8" + # Return the accept character set for all new CGI instances. def self.accept_charset @@accept_charset end + # Set the accept character set for all new CGI instances. def self.accept_charset=(accept_charset) @@accept_charset=accept_charset end + # Return the accept character set for this CGI instance. attr_reader :accept_charset # Create a new CGI instance. diff --git a/lib/cgi/util.rb b/lib/cgi/util.rb index 9f8a63a..e611cbe 100644 --- a/lib/cgi/util.rb +++ b/lib/cgi/util.rb @@ -83,9 +83,13 @@ class CGI end end end + + # Synonym for CGI.escapeHTML. def CGI::escape_html(str) escapeHTML(str) end + + # Synonym for CGI.unescapeHTML. def CGI::unescape_html(str) unescapeHTML(str) end @@ -134,9 +138,13 @@ class CGI string end end + + # Synonym for CGI.escapeElement. def CGI::escape_element(str) escapeElement(str) end + + # Synonym for CGI.unescapeElement. def CGI::unescape_element(str) unescapeElement(str) end -- 1.7.5.1