function( elements, fname, rest ) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rexml/quickpath.rb, line 222
    def QuickPath::function( elements, fname, rest )
      args = parse_args( elements, rest )
      Functions.pair = [0, elements.size]
      results = []
      elements.each do |element|
        Functions.pair[0] += 1
        Functions.node = element
        res = Functions.send( fname, *args )
        case res
        when true
          results << element
        when Integer
          results << element if Functions.pair[0] == res
        end
      end
      return results
    end
Register or log in to add new notes.