Sha256: 532d9bed8491d7bb0f55e05cc8b5d8562ee70fbdf04adbcfd248a713445c4b78

Contents?: true

Size: 874 Bytes

Versions: 7

Compression:

Stored size: 874 Bytes

Contents

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

7 entries across 6 versions & 2 rubygems

Version Path
abaci-0.3.0 vendor/bundle/gems/yard-0.9.2/lib/yard/templates/helpers/module_helper.rb
abaci-0.3.0 vendor/bundle/gems/yard-0.9.1/lib/yard/templates/helpers/module_helper.rb
yard-0.9.5 lib/yard/templates/helpers/module_helper.rb
yard-0.9.4 lib/yard/templates/helpers/module_helper.rb
yard-0.9.3 lib/yard/templates/helpers/module_helper.rb
yard-0.9.2 lib/yard/templates/helpers/module_helper.rb
yard-0.9.1 lib/yard/templates/helpers/module_helper.rb