Permalink
Browse files

* Some cleanup and fixes. Thanks dominikh!

  • Loading branch information...
1 parent 4cad931 commit 1cf8eb4ebfafc044dc62c07031f2ca11fb002464 Erik Hollensbe committed Jul 8, 2010
View
@@ -165,9 +165,9 @@ def generate_class_files
# FIXME linkify
:classlist => '<ol>' + klass.classes_and_modules.inject('') { |x,y| x << '<li>' + y.name + '</li>' } + '</ol>',
:constants => klass.constants,
- :aliases => klass.aliases,
+ :aliases => klass.method_list.select { |x| x.is_alias_for },
:attributes => klass.attributes,
- :method_list => klass.method_list
+ :method_list => klass.method_list.select { |x| !x.is_alias_for }
}
}
@@ -221,10 +221,6 @@ def file_dir
FILE_DIR
end
- def method_missing(sym, *args)
- p [sym, args]
- end
-
def h(html)
CGI::escapeHTML(html)
end
@@ -263,7 +259,7 @@ def build_javascript_search_index(entries)
method_name = entry.name
module_name = entry.parent_name
# FIXME link
- html = link_to_method(entry, '')
+ html = link_to_method(entry, [classfile(entry.parent), entry.aref].join('#'))
result << " { method: '#{method_name.downcase}', " +
"module: '#{module_name.downcase}', " +
"html: '#{html}' },\n"
@@ -11,4 +11,4 @@
%ol#index-entries{ :class => 'methods' }
- values[:methods].each do |entry|
-# FIXME link
- %li= link_to_method entry, ''
+ %li= link_to_method entry, [classfile(entry.parent), entry.aref].join('#')
@@ -20,7 +20,9 @@
%ol.paths
- values[:entry].in_files.each_with_index do |file, index|
%li{ :class => index > 0 ? 'other' : nil }
- = link_to file.full_name, file.full_name
+ -# FIXME cleanup
+ - p [file.path, values[:entry].path]
+ = link_to file.full_name, Pathname.new(file.path).relative_path_from(Pathname.new(values[:entry].path).dirname)
- if values[:entry].in_files.size > 1
%li
%a.show{ :href => '#', :onclick => 'this.parentNode.parentNode.className += " expanded"; this.parentNode.removeChild(this); return false' } show all
@@ -28,13 +28,13 @@
#aliases-list
%h2 External Aliases
.name-list
- %table{ :summary => "External aliases" }
+ %table{ :summary => "Aliases" }
- section[:aliases].each do |alia|
%tr.top-aligned-row.context-row
- %td.context-item-name= alia.old_name
+ %td.context-item-name= alia.name
%td -&gt;
- %td.context-item-value= alia.new_name
- - if alia[:desc] then
+ %td.context-item-value= link_to alia.is_alias_for.name, "##{alia.is_alias_for.aref}"
+ - unless alia.description.empty?
%tr.top-aligned-row.context-row
%td &nbsp;
%td.context-item-desc{ :colspan => "2" }

0 comments on commit 1cf8eb4

Please sign in to comment.