ni_nitdoc: Adding inherited methods descriptions
authorStefan Lage <lagestfan@gmail.com>
Fri, 28 Jun 2013 22:11:49 +0000 (18:11 -0400)
committerStefan Lage <lagestfan@gmail.com>
Wed, 3 Jul 2013 20:54:25 +0000 (16:54 -0400)
Signed-off-by: Stefan Lage <lagestfan@gmail.com>

src/ni_nitdoc.nit

index cae88c9..b231d90 100644 (file)
@@ -835,6 +835,19 @@ class NitdocMClasses
                        end
                        for prop in mmethods do description(prop)
                end
+               # Insert inherited methods
+               if mclass.inherited_methods.length > 0 then
+                       add("h3").text("Inherited Methods")
+                       for i_mclass, methods in mclass.inherited do
+                               open("p")
+                               add_html("Defined in <a href=\"{i_mclass.name}.html\">{i_mclass.name}</a>: ")
+                               for method in methods do
+                                       add_html("<a href=\"{method.link_anchor}\">{method.name}</a>")
+                                       if method != methods.last then add_html(", ")
+                               end
+                               close("p")
+                       end
+               end
                close("section")
        end