diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-13 17:54:22 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-13 17:54:22 +0000 |
commit | 8dca37990791a5572e7f7df7bbc9a0ab5aa5d8da (patch) | |
tree | 376171e53676ec75f842c865c371afa077fae976 /lib/rexml | |
parent | 172b1ba6155f5804a815a65f696355510c2a4cfc (diff) |
* lib/rexml/functions.rb: Add some documentation for REXML::Functions.
Patch by Sebastian Martinez. [Ruby 1.9 - Feature #4688]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml')
-rw-r--r-- | 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 7a05d0cf9f..20c8961aee 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| |