Method: REXML::Functions.sum
- Defined in:
- lib/rexml/functions.rb
.sum(nodes) ⇒ Object
408 409 410 411 |
# File 'lib/rexml/functions.rb', line 408 def Functions::sum( nodes ) nodes = [nodes] unless nodes.kind_of? Array nodes.inject(0) { |r,n| r + number(string(n)) } end |