Extracts the class, selector and method name parts from name like
Foo::Bar#baz.
NOTE: Given Foo::Bar, Bar is considered a class even though it may be a
method
# File lib/rdoc/ri/driver.rb, line 1106
def parse_name name
parts = name.split(/(::|#|\.)/)
if parts.length == 1 then
if parts.first =~ /^[a-z]|^([%&*+\/<>^`|~-]|\+@|-@|<<|<=>?|===?|=>|=~|>>|\[\]=?|~@)$/ then
type = '.'
meth = parts.pop
else
type = nil
meth = nil
end
elsif parts.length == 2 or parts.last =~ /::|#|\./ then
type = parts.pop
meth = nil
elsif parts[-2] != '::' or parts.last !~ /^[A-Z]/ then
meth = parts.pop
type = parts.pop
end
klass = parts.join
[klass, type, meth]
end