From 9edafa63a295eef79a1df87126713473e682d26f Mon Sep 17 00:00:00 2001 From: "Stanislav (Stas) Katkov" Date: Fri, 27 Dec 2024 01:29:52 +0100 Subject: [PATCH] Remove defined-in and constants (#22) Co-authored-by: Stanislav (Stas) Katkov --- templates/default/fulldoc/markdown/setup.rb | 31 +++++++-------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/templates/default/fulldoc/markdown/setup.rb b/templates/default/fulldoc/markdown/setup.rb index 0a09b4c..2ecd52a 100644 --- a/templates/default/fulldoc/markdown/setup.rb +++ b/templates/default/fulldoc/markdown/setup.rb @@ -104,33 +104,13 @@ def serialize(object) <% if (mix = run_verifier(object.mixins(scope))).size > 0 %> **<%= name %>:** <%= mix.sort_by {|o| o.path }.join(", ") %> <% end %><% end %> -<% unless object.root? %> -**Defined in:** <%= object.file ? object.file.sub(Dir.pwd, "") : "(unknown)" %> -<% end %> <%= rdoc_to_md object.docstring %> <%= render_tags object %> -<% if constant_listing.size > 0 %> -<% groups(constant_listing, "Constants") do |list, name| %> -<% if list.size > 0 %> -| <%= name %> | Default Value | -| --- | --- | -<% list.each do |cnst| %> -| [<%= cnst.name %>](#<%=aref(cnst)%>) | <%= cnst.value %> | -<% end %><% end %><% end %><% end %> -<% if (insmeths = public_instance_methods(object)).size > 0 %> -# Public Instance Methods -<% insmeths.each do |item| %> -## <%= item.name(false) %>(<%= item.parameters.map {|p| p.join("") }.join(", ")%>) [](#<%=aref(item)%>) -<%= rdoc_to_md item.docstring %> - -<%= render_tags item %> -<% end %><% end %> - <% if (pubmeths = public_class_methods(object)).size > 0 %> -# Public Class Methods +# Class Methods <% pubmeths.each do |item| %> ## <%= item.name(false) %>(<%= item.parameters.map {|p| p.join(" ") }.join(", ") %>) [](#<%=aref(item)%>) <%= rdoc_to_md item.docstring %> @@ -142,6 +122,15 @@ def serialize(object) ## <%= item.name %><%= item.reader? ? "[RW]" : "[R]" %> [](#<%=aref(item)%>) <%= rdoc_to_md item.docstring %> +<%= render_tags item %> +<% end %><% end %> + +<% if (insmeths = public_instance_methods(object)).size > 0 %> +#Instance Methods +<% insmeths.each do |item| %> +## <%= item.name(false) %>(<%= item.parameters.map {|p| p.join("") }.join(", ")%>) [](#<%=aref(item)%>) +<%= rdoc_to_md item.docstring %> + <%= render_tags item %> <% end %><% end %>', trim_mode: "<>",