Class: Generators::HTMLPuppetModule

Inherits:
HtmlClass
  • Object
show all
Defined in:
lib/puppet/util/rdoc/generators/puppet_generator.rb

Instance Method Summary collapse

Instance Method Details

#build_facts_summary_listObject



681
682
683
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 681

def build_facts_summary_list
  potentially_referenced_list(context.facts) { |fn| ["PLUGIN(#{fn})"] }
end

#build_nodes_list(level, context) ⇒ Object



665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 665

def build_nodes_list(level, context)
  res = ""
  prefix = "  ::" * level;

  context.nodes.sort.each do |node|
    next unless node.document_self

    res <<
      prefix <<
      "Node " <<
      href(url(node.viewer.path), "link", node.full_name) <<
      "<br />\n"
  end
  res
end

#build_plugins_summary_listObject



685
686
687
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 685

def build_plugins_summary_list
  potentially_referenced_list(context.plugins) { |fn| ["PLUGIN(#{fn})"] }
end

#factsObject



689
690
691
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 689

def facts
  @context.facts
end

#pluginsObject



693
694
695
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 693

def plugins
  @context.plugins
end

#value_hashObject



650
651
652
653
654
655
656
657
658
659
660
661
662
663
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 650

def value_hash
  @values = super

  fl = build_facts_summary_list
  @values["facts"] = fl unless fl.empty?

  pl = build_plugins_summary_list
  @values["plugins"] = pl unless pl.empty?

  nl = build_nodes_list(0, @context)
  @values["nodelist"] = nl unless nl.empty?

  @values
end