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



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

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

#build_realize_list(context) ⇒ Object



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

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

#build_require_list(context) ⇒ Object



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

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

#value_hashObject



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
439
# File 'lib/puppet/util/rdoc/generators/puppet_generator.rb', line 414

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 }
    next unless secdata.size == 1

    secdata = secdata[0]

    rdl = build_resource_detail_list(section)
    secdata["resource_list"] = rdl unless rdl.empty?
  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