summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util/reference.rb
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-07 22:29:44 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-07 22:29:44 +0000
commit1decfa31a588bc46249c89680c80f74e14183ab1 (patch)
tree0f67d5aa595bb8763ac889db7327f90482b11909 /lib/puppet/util/reference.rb
parent69cb72120ced589b81038f685f9765ceb353e062 (diff)
downloadpuppet-1decfa31a588bc46249c89680c80f74e14183ab1.tar.gz
puppet-1decfa31a588bc46249c89680c80f74e14183ab1.tar.xz
puppet-1decfa31a588bc46249c89680c80f74e14183ab1.zip
Lots of work related to generating more reference. Moving all of the individual references out of puppetdoc and into an external "reference" class, which itself can autoload, so it is now easy to add new types of references. Also adding a network reference, along with an unfinished provider reference.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2479 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/util/reference.rb')
-rw-r--r--lib/puppet/util/reference.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/puppet/util/reference.rb b/lib/puppet/util/reference.rb
index 3b1d7dd94..980baef4d 100644
--- a/lib/puppet/util/reference.rb
+++ b/lib/puppet/util/reference.rb
@@ -3,6 +3,7 @@ require 'puppet/util/instance_loader'
# Manage Reference Documentation.
class Puppet::Util::Reference
include Puppet::Util
+ include Puppet::Util::Docs
extend Puppet::Util::InstanceLoader
@@ -85,7 +86,7 @@ class Puppet::Util::Reference
end
def h(name, level)
- return "%s\n%s\n" % [name, HEADER_LEVELS[level] * name.to_s.length]
+ return "%s\n%s\n\n" % [name, HEADER_LEVELS[level] * name.to_s.length]
end
def initialize(name, options = {}, &block)
@@ -108,6 +109,10 @@ class Puppet::Util::Reference
return text.gsub(/(^|\A)/, tab).gsub(/^ +\.\./, "..")
end
+ def option(name, value)
+ ":%s: %s\n" % [name.to_s.capitalize, value]
+ end
+
def paramwrap(name, text, options = {})
options[:level] ||= 5
#str = "%s : " % name