From 86cf945054c9e1af7d4a768c08867b4abd903ea7 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Fri, 13 May 2011 11:42:12 -0300 Subject: [PATCH] Add docs to REXML functions --- lib/rexml/functions.rb | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/lib/rexml/functions.rb b/lib/rexml/functions.rb index 7a05d0c..20c8961 100644 --- a/lib/rexml/functions.rb +++ b/lib/rexml/functions.rb @@ -28,6 +28,7 @@ module REXML end end + # Returns the last node of the given list of nodes. def Functions::last( ) @@context[:size] end @@ -36,6 +37,7 @@ module REXML @@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 @@ module REXML 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| -- 1.7.4.2