summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2009-09-10 21:30:42 +0200
committerJames Turnbull <james@lovedthanlost.net>2009-09-16 11:45:58 +1000
commit577a45b45711942f71c31ff2db0c7fbcd82e1b1d (patch)
treefa7f44454490e5f7140ee43365e4a68f1b8a0364 /lib
parentd2d7070fb614840db56ca3672548bf5c58a3e4f0 (diff)
downloadpuppet-577a45b45711942f71c31ff2db0c7fbcd82e1b1d.tar.gz
puppet-577a45b45711942f71c31ff2db0c7fbcd82e1b1d.tar.xz
puppet-577a45b45711942f71c31ff2db0c7fbcd82e1b1d.zip
Fix #2622 - Puppetdoc in single manifest to console is broken
After the LoadedCode refactoring I forgot to update this (mostly) unused part of puppetdoc which unfortunately is not covered by unit tests. This commit fixes this issue. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/util/rdoc.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/puppet/util/rdoc.rb b/lib/puppet/util/rdoc.rb
index a18fa1b96..4edbf06a6 100644
--- a/lib/puppet/util/rdoc.rb
+++ b/lib/puppet/util/rdoc.rb
@@ -49,13 +49,15 @@ module Puppet::Util::RDoc
# of a manifest
def output(file, ast)
astobj = []
- ast[:nodes].each do |name, k|
+ ast.nodes.each do |name, k|
astobj << k if k.file == file
end
- ast[:classes].each do |name, k|
+
+ ast.hostclasses.each do |name,k|
astobj << k if k.file == file
end
- ast[:definitions].each do |name, k|
+
+ ast.definitions.each do |name, k|
astobj << k if k.file == file
end
astobj.sort! {|a,b| a.line <=> b.line }.each do |k|