From 577a45b45711942f71c31ff2db0c7fbcd82e1b1d Mon Sep 17 00:00:00 2001 From: Brice Figureau Date: Thu, 10 Sep 2009 21:30:42 +0200 Subject: 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 --- lib/puppet/util/rdoc.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/puppet') 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| -- cgit