aboutsummaryrefslogtreecommitdiff
path: root/src/guff/views/ecrs/api-docs.ecr
blob: bda25f58d69893a973601fc596b223d669f74ff3 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<h1><%= h(TITLE) %></h1>

<div id='toc' class='section'>
  <h2>Table of Contents</h2>

  <ul><%
    namespaces.each do |namespace|
  %>
    <li class='namespace'>
      <a
        href='#n-<%= namespace %>'
        title='View <%= namespace %> details.'
      >
        <%= namespace %>
      </a>

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

<% namespaces.each do |namespace| %>
  <div
    id='n-<%= namespace %>'
    class='namespace section'
  >
    <h2 class='namespace title'>
      <%= namespace %> methods
    </h2><!-- namespace title -->

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

        <h4>Description</h4>
        <p class='method text'>
          <%= h(method_text(namespace, method)) %>
        </p><!-- method text -->

        <h4>Parameters</h4>
        <ul class='args'><%
          method_args(namespace, method).each do |arg|
        %>
          <li class='arg'>
            <span class='arg name'><%=
              arg
            %></span><!-- arg name -->

            <span class='arg text'><%=
              h(arg_text(namespace, method, arg))
            %></span><!-- arg text -->
          </li><!-- arg -->
        <% end %></ul><!-- args -->
      </div><!-- method section -->
    <% end %>
  </div><!-- namespace section -->
<% end %>