diff options
author | Luke Kanies <luke@madstop.com> | 2007-11-23 16:11:27 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-11-23 16:11:27 -0600 |
commit | b745f04d936575d3a1a54b98bccc4b49de734531 (patch) | |
tree | 590dc7afbd83fa9449e1f1359d57b6652a39507f | |
parent | dbe70a10dd5d3d29f6529b1a0e6b6545308c6a7d (diff) | |
download | puppet-b745f04d936575d3a1a54b98bccc4b49de734531.tar.gz puppet-b745f04d936575d3a1a54b98bccc4b49de734531.tar.xz puppet-b745f04d936575d3a1a54b98bccc4b49de734531.zip |
Fixing #886 -- the problem was the I had changed the base
class for Parameter, which apparently lost the 'nodoc' method
for that class.
-rwxr-xr-x | bin/puppetdoc | 54 | ||||
-rw-r--r-- | lib/puppet/parameter.rb | 2 | ||||
-rw-r--r-- | lib/puppet/util/docs.rb | 5 |
3 files changed, 34 insertions, 27 deletions
diff --git a/bin/puppetdoc b/bin/puppetdoc index 11f9818a9..be86cc618 100755 --- a/bin/puppetdoc +++ b/bin/puppetdoc @@ -68,33 +68,33 @@ Reference = Puppet::Util::Reference begin result.each { |opt,arg| case opt - when "--all" - options[:all] = true - when "--format" - method = "to_%s" % arg - if Reference.method_defined?(method) - options[:format] = method - else - raise "Invalid output format %s" % arg - end - when "--mode" - if Reference.modes.include?(arg) - options[:mode] = arg.intern - else - raise "Invalid output mode %s" % arg - end - when "--list" - puts Reference.references.collect { |r| Reference.reference(r).doc }.join("\n") - exit(0) - when "--reference" - options[:references] << arg.intern - when "--help" - if Puppet.features.usage? - RDoc::usage && exit - else - puts "No help available unless you have RDoc::usage installed" - exit - end + when "--all" + options[:all] = true + when "--format" + method = "to_%s" % arg + if Reference.method_defined?(method) + options[:format] = method + else + raise "Invalid output format %s" % arg + end + when "--mode" + if Reference.modes.include?(arg) + options[:mode] = arg.intern + else + raise "Invalid output mode %s" % arg + end + when "--list" + puts Reference.references.collect { |r| Reference.reference(r).doc }.join("\n") + exit(0) + when "--reference" + options[:references] << arg.intern + when "--help" + if Puppet.features.usage? + RDoc::usage && exit + else + puts "No help available unless you have RDoc::usage installed" + exit + end end } rescue GetoptLong::InvalidOption => detail diff --git a/lib/puppet/parameter.rb b/lib/puppet/parameter.rb index d15c1f622..fae0587e1 100644 --- a/lib/puppet/parameter.rb +++ b/lib/puppet/parameter.rb @@ -1,6 +1,7 @@ require 'puppet/util/methodhelper' require 'puppet/util/log_paths' require 'puppet/util/logging' +require 'puppet/util/docs' class Puppet::Parameter include Puppet::Util @@ -10,6 +11,7 @@ class Puppet::Parameter include Puppet::Util::MethodHelper class << self include Puppet::Util + include Puppet::Util::Docs attr_reader :validater, :munger, :name, :default, :required_features attr_accessor :metaparam diff --git a/lib/puppet/util/docs.rb b/lib/puppet/util/docs.rb index aabf58d89..01178e5f4 100644 --- a/lib/puppet/util/docs.rb +++ b/lib/puppet/util/docs.rb @@ -67,6 +67,11 @@ module Puppet::Util::Docs str + "\n" end + attr_reader :nodoc + def nodoc? + nodoc + end + # Pad a field with spaces def pad(value, length) value.to_s + (" " * (length - value.to_s.length)) |