From c394688567d461b3c96c333708cf37384cec3bdf Mon Sep 17 00:00:00 2001 From: xibbar Date: Thu, 30 May 2013 06:58:15 +0000 Subject: * lib/cgi.rb: Add a document. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/cgi.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lib/cgi.rb') diff --git a/lib/cgi.rb b/lib/cgi.rb index 1c5ccd369f..9ecf734714 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -143,6 +143,11 @@ raise "Please, use ruby 1.9.0 or later." if RUBY_VERSION < "1.9.0" # take particular attributes where the attributes can be directly specified # as arguments, rather than via a hash. # +# === Utility HTML escape and other methods like a function. +# +# There are some utility tool defined in cgi/util.rb . +# And when include, you can use utility methods like a function. +# # == Examples of use # # === Get form values @@ -268,6 +273,20 @@ raise "Please, use ruby 1.9.0 or later." if RUBY_VERSION < "1.9.0" # CGI.new("html4Fr") # html4.01 Frameset # CGI.new("html5") # html5 # +# === Some utility methods +# +# require 'cgi/util' +# CGI.escapeHTML('Usage: foo "bar" ') +# +# +# === Some utility methods like a function +# +# require 'cgi/util' +# include CGI::Util +# escapeHTML('Usage: foo "bar" ') +# h('Usage: foo "bar" ') # alias +# +# class CGI end -- cgit v1.2.3