[前][次][番号順一覧][スレッド一覧]

ruby-changes:28936

From: xibbar <ko1@a...>
Date: Thu, 30 May 2013 15:58:25 +0900 (JST)
Subject: [ruby-changes:28936] xibbar:r40988 (trunk): * lib/cgi.rb: Add a document.

xibbar	2013-05-30 15:58:15 +0900 (Thu, 30 May 2013)

  New Revision: 40988

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40988

  Log:
    * lib/cgi.rb: Add a document.

  Modified files:
    trunk/lib/cgi.rb

Index: lib/cgi.rb
===================================================================
--- lib/cgi.rb	(revision 40987)
+++ lib/cgi.rb	(revision 40988)
@@ -143,6 +143,11 @@ raise "Please, use ruby 1.9.0 or later." https://github.com/ruby/ruby/blob/trunk/lib/cgi.rb#L143
 # 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." https://github.com/ruby/ruby/blob/trunk/lib/cgi.rb#L273
 #   CGI.new("html4Fr")  # html4.01 Frameset
 #   CGI.new("html5")    # html5
 #
+# === Some utility methods
+#
+#   require 'cgi/util'
+#   CGI.escapeHTML('Usage: foo "bar" <baz>')
+#
+#
+# === Some utility methods like a function
+#
+#   require 'cgi/util'
+#   include CGI::Util
+#   escapeHTML('Usage: foo "bar" <baz>')
+#   h('Usage: foo "bar" <baz>') # alias
+#
+#
 
 class CGI
 end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]