parse_args( element, string ) 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 240
                def QuickPath::parse_args( element, string )
                        # /.*?(?:\)|,)/
                        arguments = []
                        buffer = ""
                        while string and string != ""
                                c = string[0]
                                string.sub!(/^./u, "")
                                case c
                                when ?,
                                        # if depth = 1, then we start a new argument
                                        arguments << evaluate( buffer )
                                        #arguments << evaluate( string[0..count] )
                                when ?(
                                        # start a new method call
                                        function( element, buffer, string )
                                        buffer = ""
                                when ?)
                                        # close the method call and return arguments
                                        return arguments
                                else
                                        buffer << c
                                end
                        end
                        ""
                end
Register or log in to add new notes.