{# Method List Partial Renders all methods for a class element, grouped by visibility. Groups public methods first, then private (internal) methods in collapsible section. Usage as INCLUDE: {% set element = cls %} {% include 'api-reference/partials/method-item.html' %} Required context: element: The class DocElement with children containing methods For individual methods, import the macro: {% from 'api-reference/partials/_macros/render-method.html' import render_method %} {{ render_method(method) }} #} {% from 'api-reference/partials/_macros/render-method.html' import render_method %} {% set all_methods = getattr(element, 'children', []) | selectattr('element_type', 'eq', 'method') | list %} {% set public_methods = all_methods | rejectattr('name', 'match', '^_') | list %} {% set private_methods = all_methods | selectattr('name', 'match', '^_') | list %} {% if all_methods %}