aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/docgen/templates/skylark-library.vm
blob: 250b5ee89c7dcf7c5b9f4f1f94d0699a5c23716e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<h1 id="modules.${module.name}">${module.title}</h1>

${module.documentation}

#if (!$module.methods.isEmpty())
<div class="toc">
  <h1>Methods</h1>
  <ul>
  #foreach ($method in $module.methods)
    #if ($method.documented())
    <li><a href="#${method.name}">${method.name}</a></li>
    #end
  #end
  </ul>
</div>
#end

#foreach ($method in $module.methods)
  #if ($method.documented())
    <h2 id="${method.name}">${method.name}</h2>
    #if (!$method.signature.isEmpty())
    <p><pre>${method.signature}</pre></p>
    #end

    ${method.documentation}

    #if (!$method.params.isEmpty())
      <h3>Parameters</h3>
      <table class="table table-bordered table-condensed table-params">
        <colgroup>
          <col class="col-param">
          <col class="param-description">
        </colgroup>
        <thead>
          <tr>
            <th>Parameter</th>
            <th>Description</th>
          </tr>
        </thead>
        <tbody>
        #foreach ($param in $method.params)
          <tr>
            <td id="${param.method.name}.${param.name}">
              <code>${param.name}</code>
            </td>
            <td>
            #if (!$param.type.isEmpty())
              <p><code>${param.type}</code></p>
            #end
              <p>${param.documentation}</p>
            </td>
          </tr>
        #end
        </tbody>
      </table>
    #end
    ${method.returnTypeExtraMessage}
  #end
#end