123456789_123456789_123456789_123456789_123456789_

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

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/yard/templates/helpers/module_helper.rb

Overview

Helper methods for managing module objects.

Instance Method Summary

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:

[ GitHub ]

  
# 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