Class: Generators::HTMLPuppetClass

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

Instance Method Summary collapse

Methods included from ResourceContainer

#build_resource_detail_list, #build_resource_summary_list, #collect_resources

Methods included from ReferencedListBuilder

#build_referenced_list

Instance Method Details

#build_child_list(context) ⇒ Object



448
449
450
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 448

def build_child_list(context)
  build_referenced_list(context.childs)
end

#build_realize_list(context) ⇒ Object



444
445
446
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 444

def build_realize_list(context)
  build_referenced_list(context.realizes)
end

#build_require_list(context) ⇒ Object



440
441
442
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 440

def build_require_list(context)
  build_referenced_list(context.requires)
end

#value_hashObject



413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 413

def value_hash
  super
  rl = build_resource_summary_list
  @values["resources"] = rl unless rl.empty?

  @context.sections.each do |section|
    secdata = @values["sections"].select { |s| s["secsequence"] == section.sequence }
    if secdata.size == 1
      secdata = secdata[0]

      rdl = build_resource_detail_list(section)
      secdata["resource_list"] = rdl unless rdl.empty?
    end
  end

  rl = build_require_list(@context)
  @values["requires"] = rl unless rl.empty?

  rl = build_realize_list(@context)
  @values["realizes"] = rl unless rl.empty?

  cl = build_child_list(@context)
  @values["childs"] = cl unless cl.empty?

  @values
end