From 48fb10fef522ab9262061bc612b44d74a8bda17d Mon Sep 17 00:00:00 2001 From: Seba Gamboa Date: Fri, 25 Sep 2015 13:12:22 -0300 Subject: Listing functions --- .../default/header/html/function_details_list.erb | 7 +++++++ templates/default/header/html/function_summary.erb | 16 +++++++++++----- templates/default/header/html/includes.erb | 1 + templates/default/header/html/item_summary.erb | 19 +++++++++++++++++++ templates/default/header/html/pre_docstring.erb | 1 + templates/default/header/html/setup.rb | 10 ++++++---- 6 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 templates/default/header/html/function_details_list.erb create mode 100644 templates/default/header/html/includes.erb create mode 100644 templates/default/header/html/item_summary.erb create mode 100644 templates/default/header/html/pre_docstring.erb (limited to 'templates/default/header') diff --git a/templates/default/header/html/function_details_list.erb b/templates/default/header/html/function_details_list.erb new file mode 100644 index 0000000..37a9cc8 --- /dev/null +++ b/templates/default/header/html/function_details_list.erb @@ -0,0 +1,7 @@ +
+

Function Details

+ + <% function_listing.each_with_index do |func, i| %> + <%= yieldall :object => func, :owner => object, :index => i %> + <% end %> +
diff --git a/templates/default/header/html/function_summary.erb b/templates/default/header/html/function_summary.erb index 037daa4..f37f075 100644 --- a/templates/default/header/html/function_summary.erb +++ b/templates/default/header/html/function_summary.erb @@ -1,6 +1,12 @@ - + +<% end %> diff --git a/templates/default/header/html/includes.erb b/templates/default/header/html/includes.erb new file mode 100644 index 0000000..6731e2b --- /dev/null +++ b/templates/default/header/html/includes.erb @@ -0,0 +1 @@ +Included heaers diff --git a/templates/default/header/html/item_summary.erb b/templates/default/header/html/item_summary.erb new file mode 100644 index 0000000..522a3a1 --- /dev/null +++ b/templates/default/header/html/item_summary.erb @@ -0,0 +1,19 @@ +
  • + + <%= fsignature(@item, true, false) %> + + <% if @item.aliases.size > 0 %> + (also: <%= @item.aliases.map {|o| h(o.name(true)) }.join(", ") %>) + <% end %> + + <% if @item.visibility != :public %><%= @item.visibility %><% end %> + <% if @item.has_tag?(:abstract) %>abstract<% end %> + <% if @item.has_tag?(:deprecated) %>deprecated<% end %> + <% if @item.has_tag?(:api) && @item.tag(:api).text == 'private' %>private<% end %> + + <% if @item.has_tag?(:deprecated) %> + Deprecated. <%= htmlify_line @item.tag(:deprecated).text %> + <% else %> + <%= htmlify_line docstring_summary(@item) %> + <% end %> +
  • diff --git a/templates/default/header/html/pre_docstring.erb b/templates/default/header/html/pre_docstring.erb new file mode 100644 index 0000000..f3475da --- /dev/null +++ b/templates/default/header/html/pre_docstring.erb @@ -0,0 +1 @@ +

    Overview

    diff --git a/templates/default/header/html/setup.rb b/templates/default/header/html/setup.rb index 6e5f8f9..52eb81c 100644 --- a/templates/default/header/html/setup.rb +++ b/templates/default/header/html/setup.rb @@ -1,8 +1,10 @@ -def init - super +include T('default/module') +include YARD::MRuby::Templates::Helpers::HTMLHelper - sections.push :header - sections.push :function_summary +def init + sections :header, :pre_docstring, T('docstring'), :includes, + :function_summary, [:item_summary], + :function_details_list, [T('function_details')] end -- cgit v1.2.3