- methods = values[:entry].method_list + values[:entry].attributes - unless methods.empty? #method-list %h2 Methods - %w[attr attr_accessor attr_reader attr_writer class instance].each do |type| - (RDoc::VISIBILITIES rescue RDoc::Context::VISIBILITIES).each do |vis| -# FIXME ugly - list = methods.reject { |x| x.respond_to?(:is_alias_for) && x.is_alias_for }.select { |x| x.visibility == vis && x.type == type.to_s } - unless list.empty? - type_result = "" - if type =~ /^attr_/ - type_result += type.sub(/^attr_/, '').capitalize - else - type_result += type.capitalize - type_result = "#{vis.to_s.capitalize} #{type_result}" %h3= type_result %ol - list.each do |method| - if method.respond_to?(:aref) - if method.name.to_s.empty? && method.call_seq %li= link_to method.call_seq.gsub(//, "").split(/[\r\n]+/).map{ |s| s.split(/([({]+|\[\{|\s+(#?=>|→)\s+)/).first.sub(/^[A-Za-z0-9_:]+\./, "").sub(/\s+=\s+.*/, "=").strip }.uniq.join("
\n"), '#' + method.aref - else %li= link_to method.name, '#' + method.aref - elsif method.respond_to?(:html_name) %li= link_to method.name, "#method-#{method.html_name}" - else %li= method.name - if values[:entry].requires or values[:entry].sections or values[:entry].includes #context - unless values[:entry].requires.empty? #requires %h2 Required files %ol - values[:entry].requires.each do |req| %li= req.name -# FIXME reenable -#- if values[:entry].sections -##contents -#%h2 Contents -#%ol -#- values[:entry].sections.each do |item| -#%li= link_to values[:secname], values[:href] - unless values[:entry].includes.empty? #includes %h2 Included modules %ol - values[:entry].includes.each do |inc| %li= inc.name