# module Generators::ResourceContainer

This module is used to hold/generate a list of puppet resources this is used in HTMLPuppetClass and HTMLPuppetNode

### Public Instance Methods

build_resource_detail_list(section) click to toggle source

    # File lib/puppet/util/rdoc/generators/puppet_generator.rb, line 392
    def build_resource_detail_list(section)
      outer = []
      resources = @resources.sort
      resources.each do |r|
        row = {}
        if r.section == section and r.document_self
          row["name"]        = CGI.escapeHTML(r.name)
          desc = r.description.strip
          row["m_desc"]      = desc unless desc.empty?
          row["aref"]        = r.aref
          row["params"]      = r.params
          outer << row
        end
      end
      outer
    end

build_resource_summary_list(path_prefix='') click to toggle source

    # File lib/puppet/util/rdoc/generators/puppet_generator.rb, line 379
    def build_resource_summary_list(path_prefix='')
      collect_resources unless @resources
      resources = @resources.sort
      res = []
      resources.each do |r|
        res << {
          "name" => CGI.escapeHTML(r.name),
          "aref" => CGI.escape(path_prefix)+"\#"+CGI.escape(r.aref)
        }
      end
      res
    end

collect_resources() click to toggle source

    # File lib/puppet/util/rdoc/generators/puppet_generator.rb, line 374
    def collect_resources
      list = @context.resource_list
      @resources = list.collect {|m| HTMLPuppetResource.new(m, self, @options) }
    end