aboutsummaryrefslogtreecommitdiff
path: root/src/guff/views/api-docs.ecr
blob: 8ab9cc03e5f63091ccb20900a679ed473fbf734c (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
<h1><%= TITLE %></h1>

<div class='section'>
  <h2>Table of Contents</h2>
  <ul><% namespaces.each do |namespace| %>
    <li>
      <a
        href='#n-<%= namespace %>'
        title='View <%= namespace %> details.'
      >
        <%= namespace %>
      </a>

      <ul><% methods(namespace).each do |method| %>
        <li>
          <a
            href='#m-<%= namespace %>-<%= method %>'
            title='View <%= namespace %>/<%= method %> details.'
          >
            <%= method %>
          </a>
        </li>
      <% end %></ul>
    </li>
  <% end %></ul>
</div><!-- section -->

<% namespaces.each do |namespace| %>
  <div
    id='n-<%= namespace %>'
    class='section'
  >
    <h2><%= namespace %> methods</h2>
    <% methods(namespace).each do |method| %>
      <div
        id='m-<%= namespace %>-<%= method %>'
        class='section'
      >
        <h3><%= namespace %>/<%= method %></h3>

        <h4>Description</h4>
        <p>
          <%= h(method_text(namespace, method)) %>
        </p>

        <h4>Parameters</h4>
        <ul><% method_args(namespace, method).each do |arg| %>
          <li>
            <%= arg %>:
            <%= h(arg_text(namespace, method, arg)) %>
          </li>
        <% end %></ul>
      </div><!-- section -->
    <% end %>
  </div><!-- section -->
<% end %>