def build_method_detail_list(section)
outer = []
methods = @methods.sort
for singleton in [true, false]
for vis in [ :public, :protected, :private ]
res = []
methods.each do |m|
if m.section == section and
m.document_self and
m.visibility == vis and
m.singleton == singleton
row = {}
if m.call_seq
row["callseq"] = m.call_seq.gsub(/->/, '→')
else
row["name"] = CGI.escapeHTML(m.name)
row["params"] = m.params
end
desc = m.description.strip
row["m_desc"] = desc unless desc.empty?
row["aref"] = m.aref
row["href"] = m.path
row["m_seq"] = m.seq
row["visibility"] = m.visibility.to_s
alias_names = []
m.aliases.each do |other|
if other.viewer
alias_names << {
'name' => other.name,
'href' => other.viewer.path,
'aref' => other.viewer.aref
}
end
end
unless alias_names.empty?
row["aka"] = alias_names
end
code = m.source_code
row["sourcecode"] = code if code
res << row
end
end
if res.size > 0
outer << {
"type" => vis.to_s.capitalize,
"category" => singleton ? "Class" : "Instance",
"methods" => res
}
end
end
end
outer
end