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


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

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

#build_realize_list(context) ⇒ Object


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

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

#build_require_list(context) ⇒ Object


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

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

#value_hashObject


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

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