ruby-changes:19510
From: drbrain <ko1@a...>
Date: Sat, 14 May 2011 02:59:58 +0900 (JST)
Subject: [ruby-changes:19510] drbrain:r31551 (trunk): * lib/rexml/functions.rb: Add some documentation for REXML::Functions.
drbrain 2011-05-14 02:54:22 +0900 (Sat, 14 May 2011) New Revision: 31551 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31551 Log: * lib/rexml/functions.rb: Add some documentation for REXML::Functions. Patch by Sebastian Martinez. [Ruby 1.9 - Feature #4688] Modified files: trunk/ChangeLog trunk/lib/rexml/functions.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 31550) +++ ChangeLog (revision 31551) @@ -1,3 +1,8 @@ +Sat May 14 02:54:04 2011 Eric Hodel <drbrain@s...> + + * lib/rexml/functions.rb: Add some documentation for REXML::Functions. + Patch by Sebastian Martinez. [Ruby 1.9 - Feature #4688] + Sat May 14 02:51:42 2011 Eric Hodel <drbrain@s...> * lib/resolv.rb: Hide private method and state-tracking constants from Index: lib/rexml/functions.rb =================================================================== --- lib/rexml/functions.rb (revision 31550) +++ lib/rexml/functions.rb (revision 31551) @@ -28,6 +28,7 @@ end end + # Returns the last node of the given list of nodes. def Functions::last( ) @@context[:size] end @@ -36,6 +37,7 @@ @@context[:index] end + # Returns the size of the given list of nodes. def Functions::count( node_set ) node_set.size end @@ -129,6 +131,11 @@ end end + # A node-set is converted to a string by + # returning the concatenation of the string-value + # of each of the children of the node in the + # node-set that is first in document order. + # If the node-set is empty, an empty string is returned. def Functions::string_value( o ) rv = "" o.children.each { |e| -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/