diff options
author | Luke Kanies <luke@madstop.com> | 2005-07-12 05:51:35 +0000 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2005-07-12 05:51:35 +0000 |
commit | d6e2102643ea380c5e7b63a722dae31ed499571d (patch) | |
tree | 66b9463b6928bbc704c13546223bb15fcf20b869 /lib/puppet | |
parent | 3f9bb25b4e44ad94239e8a5be53cb67ad9d765e5 (diff) | |
download | puppet-d6e2102643ea380c5e7b63a722dae31ed499571d.tar.gz puppet-d6e2102643ea380c5e7b63a722dae31ed499571d.tar.xz puppet-d6e2102643ea380c5e7b63a722dae31ed499571d.zip |
toying with some doc stuff
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@375 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/type.rb | 27 | ||||
-rw-r--r-- | lib/puppet/type/component.rb | 13 |
2 files changed, 39 insertions, 1 deletions
diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb index df71f352e..5072a0860 100644 --- a/lib/puppet/type.rb +++ b/lib/puppet/type.rb @@ -91,6 +91,7 @@ class Type < Puppet::Element # the Type class attribute accessors class << self attr_reader :name, :namevar, :states, :validstates, :parameters + attr_reader :doc end #--------------------------------------------------------------- @@ -140,6 +141,10 @@ class Type < Puppet::Element @validstates = {} @validparameters = {} + unless defined? @doc + @doc = "" + end + unless defined? @states @states = {} end @@ -490,7 +495,7 @@ class Type < Puppet::Element #--------------------------------------------------------------- def states - debug "%s has %s states" % [self,@states.length] + #debug "%s has %s states" % [self,@states.length] tmpstates = [] self.class.states.each { |state| if @states.include?(state.name) @@ -725,6 +730,14 @@ class Type < Puppet::Element #--------------------------------------------------------------- #--------------------------------------------------------------- + def self.eachmetaparam + @@metaparams.each { |param| + yield param + } + end + #--------------------------------------------------------------- + + #--------------------------------------------------------------- # this just marks states that we definitely want to retrieve values # on def metacheck(args) @@ -834,6 +847,18 @@ class Type < Puppet::Element @schedule = schedule end #--------------------------------------------------------------- + #--------------------------------------------------------------- + + #--------------------------------------------------------------- + #--------------------------------------------------------------- + # Documentation methods + #--------------------------------------------------------------- + #--------------------------------------------------------------- + def self.paramdoc?(param) + @paramdoc[param] + end + #--------------------------------------------------------------- + #--------------------------------------------------------------- end # Puppet::Type end diff --git a/lib/puppet/type/component.rb b/lib/puppet/type/component.rb index 820427e1a..c3ba3fadf 100644 --- a/lib/puppet/type/component.rb +++ b/lib/puppet/type/component.rb @@ -19,6 +19,19 @@ module Puppet @states = [] @parameters = [:name,:type] + # yeah, this doc stuff is all pretty worthless right now + @doc = %{ +Component +--------- +} + + @paramdoc = { + :name => %{ +}, + :type => %{ +} + } + def each @children.each { |child| yield child } end |