summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-03-20 00:49:46 -0500
committerJames Turnbull <james@lovedthanlost.net>2009-03-20 18:26:06 +1100
commit87ec08e5d5efe1576e338861bc514b7b5c2a6d6a (patch)
treece02fded3cfac8cc95449ef03e26eb94d2383859 /lib
parentaf4455e31df403c55a5db06ee8d0d4e0e58c4154 (diff)
downloadpuppet-87ec08e5d5efe1576e338861bc514b7b5c2a6d6a.tar.gz
puppet-87ec08e5d5efe1576e338861bc514b7b5c2a6d6a.tar.xz
puppet-87ec08e5d5efe1576e338861bc514b7b5c2a6d6a.zip
Fixing #2108 - pi should work again
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/application/pi.rb14
1 files changed, 8 insertions, 6 deletions
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)