diff options
| author | Seba Gamboa <[email protected]> | 2015-09-25 10:11:59 -0300 |
|---|---|---|
| committer | Seba Gamboa <[email protected]> | 2015-09-25 10:11:59 -0300 |
| commit | 723c2d4bd9575f05b5272a9e2eacb45e1d538af3 (patch) | |
| tree | 3a1f99ea4ff260eca955c63bf8d76bd7589232e5 /templates/default/fulldoc/html | |
| parent | 5a6d8a0131140873fa1cd37bd3d76b0b06d633ae (diff) | |
| download | yard-mruby-723c2d4bd9575f05b5272a9e2eacb45e1d538af3.tar.gz yard-mruby-723c2d4bd9575f05b5272a9e2eacb45e1d538af3.zip | |
Headers and functions list
Diffstat (limited to 'templates/default/fulldoc/html')
| -rw-r--r-- | templates/default/fulldoc/html/full_list_functions.erb | 10 | ||||
| -rw-r--r-- | templates/default/fulldoc/html/full_list_headers.erb | 11 | ||||
| -rw-r--r-- | templates/default/fulldoc/html/setup.rb | 7 |
3 files changed, 26 insertions, 2 deletions
diff --git a/templates/default/fulldoc/html/full_list_functions.erb b/templates/default/fulldoc/html/full_list_functions.erb new file mode 100644 index 0000000..1dca483 --- /dev/null +++ b/templates/default/fulldoc/html/full_list_functions.erb @@ -0,0 +1,10 @@ +<% even_odd = 'odd' %> +<% @items.each do |item| %> + <li class="<%= even_odd %> <%= item.has_tag?(:deprecated) ? 'deprecated' : '' %>"> + <div class="item"> + <%= linkify item, h(item.name(true)) %> + <small><%= item.header.title %></small> + </div> + </li> + <% even_odd = (even_odd == 'even' ? 'odd' : 'even') %> +<% end %> diff --git a/templates/default/fulldoc/html/full_list_headers.erb b/templates/default/fulldoc/html/full_list_headers.erb index 4b32c70..9a1e4e5 100644 --- a/templates/default/fulldoc/html/full_list_headers.erb +++ b/templates/default/fulldoc/html/full_list_headers.erb @@ -1 +1,10 @@ -TODO: Display C API +<li id="object_" class="odd"><div class="item" style="padding-left:30px"><%= link_object(YARD::MRuby::CodeObjects::HEADERS_ROOT, "All Headers", nil, false) %></div></li> +<% even_odd = 'odd' %> +<% @items.each do |item| %> + <li class="<%= even_odd %>"> + <div class="item"> + <%= linkify item, h(item.name(true)) %> + </div> + </li> + <% even_odd = (even_odd == 'even' ? 'odd' : 'even') %> +<% end %> diff --git a/templates/default/fulldoc/html/setup.rb b/templates/default/fulldoc/html/setup.rb index cd2e29a..5e306e8 100644 --- a/templates/default/fulldoc/html/setup.rb +++ b/templates/default/fulldoc/html/setup.rb @@ -14,12 +14,17 @@ def init end def generate_header_list - puts "generate_header_list" headers = Registry.all(:header) headers_ordered_by_name = headers.sort {|x,y| x.value.to_s <=> y.value.to_s } generate_full_list headers_ordered_by_name, :headers end +def generate_function_list + functions = Registry.all(:function) + functions_ordered_by_name = functions.sort {|x,y| x.name.to_s <=> y.name.to_s } + generate_full_list functions_ordered_by_name, :functions +end + # Helpler method to generate a full_list page of the specified objects with the # specified type. def generate_full_list(objects,type,options = {}) |
