From 87ec08e5d5efe1576e338861bc514b7b5c2a6d6a Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Fri, 20 Mar 2009 00:49:46 -0500 Subject: Fixing #2108 - pi should work again Signed-off-by: Luke Kanies --- lib/puppet/application/pi.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/puppet/application') diff --git a/lib/puppet/application/pi.rb b/lib/puppet/application/pi.rb index 4c73418a8..3ac6081e1 100644 --- a/lib/puppet/application/pi.rb +++ b/lib/puppet/application/pi.rb @@ -124,9 +124,10 @@ class TypeDoc # List details about attributes def format_attrs(type, attrs) docs = {} - type.eachattr do |obj, kind| - if attrs.include?(kind) && obj.name != :provider - docs[obj.name] = obj.doc + type.allattrs.each do |name| + kind = type.attrtype(name) + if attrs.include?(kind) && name != :provider + docs[name] = type.attrclass(name).doc end end @@ -146,9 +147,10 @@ class TypeDoc # List the names of attributes def list_attrs(type, attrs) params = [] - type.eachattr do |obj, kind| - if attrs.include?(kind) && obj.name != :provider - params << obj.name.to_s + type.allattrs.each do |name| + kind = type.attrtype(name) + if attrs.include?(kind) && name != :provider + params << name.to_s end end puts @format.wrap(params.sort.join(", "), :indent => 4) -- cgit