Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
* faking aref for attrs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Hollensbe committed Jul 12, 2010
1 parent c42e62d commit 1ddffeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/hanna/template_files/method_list.haml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
%li= link_to method.call_seq.gsub(/<br\s*\/?>/, "").split(/[\r\n]+/).map{ |s| s.split(/([({]+|\[\{|\s+(#?=>|&rarr;)\s+)/).first.sub(/^[A-Za-z0-9_:]+\./, "").sub(/\s+=\s+.*/, "=").strip }.uniq.join("<br />\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

Expand Down
3 changes: 2 additions & 1 deletion lib/hanna/template_files/sections.haml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
%table
- section[:attributes].each do |attrib|
%tr.top-aligned-row.context-row
%td.context-item-name= attrib.name
%td.context-item-name
%a{:name => "method-#{attrib.html_name}"}=attrib.name
%td.context-item-value= attrib.rw ? "[#{attrib.rw}]" : '&nbsp;'
%td.context-item-desc~ sanitize_code_blocks(attrib.description)

Expand Down

0 comments on commit 1ddffeb

Please sign in to comment.