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

Included in:
Server::Commands::ListMethodsCommand, Server::Commands::SearchCommand
Defined in:
lib/yard/templates/helpers/module_helper.rb

Overview

Helper methods for managing module objects.

Instance Method Summary collapse

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



10
11
12
13
14
15
# File 'lib/yard/templates/helpers/module_helper.rb', line 10

def prune_method_listing(list, hide_attributes = true)
  list = run_verifier(list)
  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