# Module: YARD::Templates::Helpers::ModuleHelper

Included in:
  Server::Commands::SearchCommand, HtmlSyntaxHighlightHelper

Defined in:
  lib/yard/templates/helpers/module_helper.rb

## Overview

Helper methods for managing module objects.

## Instance Method Summary collapse

- #prune_method_listing(list, hide_attributes = true) ⇒ Array<CodeObjects::Base>

  Prunes the method listing by running the verifier and removing attributes/aliases.

## Instance Method Details

### #prune_method_listing(list, hide_attributes = true) ⇒ `Array<CodeObjects::Base>`

Prunes the method listing by running the verifier and removing attributes/aliases

Parameters:

- list (`Array<CodeObjects::Base>`) —

  a list of methods

- hide_attributes (`Boolean`) (defaults to: `true`) —

  whether to prune attribute methods from the list

Returns:

- (`Array<CodeObjects::Base>`) —

  a pruned list of methods

    11
    12
    13
    14
    15
    16
    17

    # File 'lib/yard/templates/helpers/module_helper.rb', line 11

    def prune_method_listing(list, hide_attributes = true)
      list = run_verifier(list)
      list = list.reject {|o| run_verifier([o.parent]).empty? }
      list = list.reject {|o| o.is_alias? unless CodeObjects::Proxy === o.namespace }
      list = list.reject {|o| o.is_attribute? unless CodeObjects::Proxy === o.namespace } if hide_attributes
      list
    end