Skip to content

Commit

Permalink
Remove defined-in and constants (#22)
Browse files Browse the repository at this point in the history
Co-authored-by: Stanislav (Stas) Katkov <github@skatkov.com>
  • Loading branch information
skatkov and Stanislav (Stas) Katkov authored Dec 27, 2024
1 parent 979262c commit 9edafa6
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions templates/default/fulldoc/markdown/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>
Expand All @@ -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: "<>",
Expand Down

0 comments on commit 9edafa6

Please sign in to comment.