<% unless methods.empty? %>
  <h2>
    <%= Crystal::Doc.anchor_link(title) %>
    <%= title %>
  </h2>
  <% methods.each do |method| %>
    <div class="entry-detail" id="<%= method.html_id %>">
      <div class="signature">
        <%= method.abstract? ? "abstract " : "" %><%= method.visibility.try(&.+(" ")) %>
        <%= method.kind %><strong><%= method.name %></strong><%= method.real_name %><%= method.args_to_html %>

        <a class="method-permalink" href="<%= method.anchor %>">#</a>
      </div>
      <% if doc = method.formatted_doc %>
        <div class="doc">
          <% if doc_copied_from = method.doc_copied_from %>
            <div class="doc-inherited">
              Description copied from <%= doc_copied_from.kind %> <%= doc_copied_from.link_from(method.type) %>
            </div>
          <% end %>
          <%= doc %>
        </div>
      <% end %>
      <br/>
      <div>
        <% if source_link = method.location.try(&.url) %>
          [<a href="<%= source_link %>" target="_blank">View source</a>]
        <% end %>
      </div>
    </div>
  <% end %>
<% end %>
