inject( xpath=nil, initial=nil )
public
Hide source
# File lib/rexml/element.rb, line 938 def inject( xpath=nil, initial=nil ) first = true XPath::each( @element, xpath ) {|e| if (e.kind_of? Element) if (first and initial == nil) initial = e first = false else initial = yield( initial, e ) if e.kind_of? Element end end } initial end