diff options
author | Brice Figureau <brice-puppet@daysofwonder.com> | 2009-10-13 23:47:06 +0200 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-10-24 08:36:58 +1100 |
commit | ced5a7887836d1491273b5d6728589f494f8a337 (patch) | |
tree | d3f90aff910a1177d92f998013f490a0b321d520 /lib/puppet/util/rdoc/code_objects.rb | |
parent | 8d9fbbd4b9d7f1d467ea6123fedcf0ee74f4e8cc (diff) | |
download | puppet-ced5a7887836d1491273b5d6728589f494f8a337.tar.gz puppet-ced5a7887836d1491273b5d6728589f494f8a337.tar.xz puppet-ced5a7887836d1491273b5d6728589f494f8a337.zip |
Fix #2376 - Display class/node inheritance in puppetdoc
While we were keeping track of superclass/nodes during RDoc generation
we weren't doing the reverse.
This patch enhance Puppetdoc RDoc mode by tracking inheritance and
for each base/super class/nodes displays the list of inherited classes
/nodes.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib/puppet/util/rdoc/code_objects.rb')
-rw-r--r-- | lib/puppet/util/rdoc/code_objects.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/util/rdoc/code_objects.rb b/lib/puppet/util/rdoc/code_objects.rb index 056f376c6..be5e468c0 100644 --- a/lib/puppet/util/rdoc/code_objects.rb +++ b/lib/puppet/util/rdoc/code_objects.rb @@ -88,12 +88,13 @@ module RDoc # It is mapped to a HTMLPuppetClass for display # It leverages RDoc (ruby) Class class PuppetClass < ClassModule - attr_accessor :resource_list, :requires + attr_accessor :resource_list, :requires, :childs def initialize(name, superclass) super(name,superclass) @resource_list = [] @requires = [] + @childs = [] end def add_resource(resource) @@ -114,6 +115,10 @@ module RDoc def add_require(required) add_to(@requires, required) end + + def add_child(child) + @childs << child + end end # PuppetNode holds a puppet node |