Sha256: 12ce4526609259eb3acfc40cb451ff4b957942b0a822b3af86d77e6fffd8f6f7
Contents?: true
Size: 925 Bytes
Versions: 2
Compression:
Stored size: 925 Bytes
Contents
# frozen_string_literal: true module YARD module Templates module Helpers # Helper methods for managing module objects. module ModuleHelper # Prunes the method listing by running the verifier and removing attributes/aliases # @param [Array<CodeObjects::Base>] list a list of methods # @param [Boolean] hide_attributes whether to prune attribute methods from the list # @return [Array<CodeObjects::Base>] a pruned list of methods 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 end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
yard-0.9.18 | lib/yard/templates/helpers/module_helper.rb |
yard-0.9.17 | lib/yard/templates/helpers/module_helper.rb |