method
parse_args
v2_1_10 -
Show latest stable
- Class:
REXML::QuickPath
parse_args( element, string )public
No documentation available.
# File lib/rexml/quickpath.rb, line 239
def QuickPath::parse_args( element, string )
# /.*?(?:\)|,)/
arguments = []
buffer = ""
while string and string != ""
c = string[0]
string.sub!(/^./, "")
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