* 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
This commit is contained in:
parent
172b1ba615
commit
8dca379907
@ -1,3 +1,8 @@
|
|||||||
|
Sat May 14 02:54:04 2011 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
* 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@segment7.net>
|
Sat May 14 02:51:42 2011 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* lib/resolv.rb: Hide private method and state-tracking constants from
|
* lib/resolv.rb: Hide private method and state-tracking constants from
|
||||||
|
@ -28,6 +28,7 @@ module REXML
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Returns the last node of the given list of nodes.
|
||||||
def Functions::last( )
|
def Functions::last( )
|
||||||
@@context[:size]
|
@@context[:size]
|
||||||
end
|
end
|
||||||
@ -36,6 +37,7 @@ module REXML
|
|||||||
@@context[:index]
|
@@context[:index]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Returns the size of the given list of nodes.
|
||||||
def Functions::count( node_set )
|
def Functions::count( node_set )
|
||||||
node_set.size
|
node_set.size
|
||||||
end
|
end
|
||||||
@ -129,6 +131,11 @@ module REXML
|
|||||||
end
|
end
|
||||||
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 )
|
def Functions::string_value( o )
|
||||||
rv = ""
|
rv = ""
|
||||||
o.children.each { |e|
|
o.children.each { |e|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user