Sha256: df6cebfef4d9e02fd4f9e64b97c7d715fc84e8aa96e26a07c0f75045aa786d97

Contents?: true

Size: 751 Bytes

Versions: 4

Compression:

Stored size: 751 Bytes

Contents

module PuppetStrings::Markdown
  module TableOfContents
    def self.render
      final = "## Table of Contents\n\n"

      [PuppetStrings::Markdown::PuppetClasses,
      PuppetStrings::Markdown::DefinedTypes,
      PuppetStrings::Markdown::ResourceTypes,
      PuppetStrings::Markdown::Functions,
      PuppetStrings::Markdown::DataTypes,
      PuppetStrings::Markdown::PuppetTasks,
      PuppetStrings::Markdown::PuppetPlans].each do |r|
        toc = r.toc_info
        group_name = toc.shift
        group = toc
        priv = r.contains_private?

        template = File.join(File.dirname(__FILE__),"templates/table_of_contents.erb")
        final << ERB.new(File.read(template), nil, '-').result(binding)
      end
      final
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
puppet-strings-2.5.0 lib/puppet-strings/markdown/table_of_contents.rb
puppet-strings-2.4.0 lib/puppet-strings/markdown/table_of_contents.rb
puppet-strings-2.3.1 lib/puppet-strings/markdown/table_of_contents.rb
puppet-strings-2.3.0 lib/puppet-strings/markdown/table_of_contents.rb