<% if (class_methods = klass.class_method_list.sort).any? %>
  <div class="nav-section">
    <details class="nav-section-collapsible" open>
      <summary class="nav-section-header">
        <span class="nav-section-icon">
          <svg><use href="#icon-class-methods"></use></svg>
        </span>
        <span class="nav-section-title">Class Methods</span>
        <span class="nav-section-chevron">
          <svg><use href="#icon-chevron"></use></svg>
        </span>
      </summary>
      <ul class="nav-list" role="directory">
        <%- class_methods.each do |meth| %>
        <li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= h meth.name -%></a></li>
        <%- end %>
      </ul>
    </details>
  </div>
<% end %>

<% if (instance_methods = klass.instance_methods.sort).any? %>
  <div class="nav-section">
    <details class="nav-section-collapsible" open>
      <summary class="nav-section-header">
        <span class="nav-section-icon">
          <svg><use href="#icon-instance-methods"></use></svg>
        </span>
        <span class="nav-section-title">Instance Methods</span>
        <span class="nav-section-chevron">
          <svg><use href="#icon-chevron"></use></svg>
        </span>
      </summary>
      <ul class="nav-list" role="directory">
        <%- instance_methods.each do |meth| %>
        <li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= h meth.name -%></a></li>
        <%- end %>
      </ul>
    </details>
  </div>
<% end %>
