def self.gen_method_infos *aParseTrees
meths = aParseTrees.map do |i|
[i, i.classes, i.modules].flatten.map {|j| j.method_list }
end.flatten.uniq
meths.map do |m|
hier = []
root = m.parent
while root && root.parent
hier.unshift root
root = root.parent
end
if hier.empty?
path = m.name
else
path = hier.map {|n| n.name}.join('::')
path = [path, m.name].join(m.singleton ? '::' : '#')
end
args = m.params
if m.block_params
args.sub! %r/\#.*(?=.$)/, ''
args << " { |#{m.block_params}| ... }"
end
{
:file => root.file_absolute_name,
:name => path,
:args => args,
:decl => path + args,
:docs => m.comment,
:docs_html => DummyMarkup.new.markup(m.comment),
:node => m,
:root => root,
}
end
end