Sha256: 956cd6a43a5ac12c2d36affc12d2e57c4bcd1160a0ebd2a354de7bc290645d37

Contents?: true

Size: 782 Bytes

Versions: 4

Compression:

Stored size: 782 Bytes

Contents

# frozen_string_literal: true

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.9.0 lib/puppet-strings/markdown/table_of_contents.rb
puppet-strings-2.8.0 lib/puppet-strings/markdown/table_of_contents.rb
puppet-strings-2.7.0 lib/puppet-strings/markdown/table_of_contents.rb
puppet-strings-2.6.0 lib/puppet-strings/markdown/table_of_contents.rb