summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2008-03-03 11:59:14 +1100
committerJames Turnbull <james@lovedthanlost.net>2008-03-03 11:59:14 +1100
commit281448fb47a7c88bf8d1c3222d03264ecfaeb183 (patch)
tree1e8bb91ed20fd1385c63cff8d5aa77db7eb1f68d /lib/puppet/parser
parentf1d75c8bc2604ea396c6d88ba7eef866f48f6046 (diff)
parentba803a1fb8190997f277b83d50c531b446b2a67f (diff)
downloadpuppet-281448fb47a7c88bf8d1c3222d03264ecfaeb183.tar.gz
puppet-281448fb47a7c88bf8d1c3222d03264ecfaeb183.tar.xz
puppet-281448fb47a7c88bf8d1c3222d03264ecfaeb183.zip
Merge branch '0.24.x' of git://reductivelabs.com/puppet into 0.24.x
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/resource.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb
index 46be89ca2..b001e165b 100644
--- a/lib/puppet/parser/resource.rb
+++ b/lib/puppet/parser/resource.rb
@@ -82,12 +82,19 @@ class Puppet::Parser::Resource
# Do any finishing work on this object, called before evaluation or
# before storage/translation.
def finish
+ return if finished?
+ @finished = true
add_defaults()
add_metaparams()
add_scope_tags()
validate()
end
+ # Has this resource already been finished?
+ def finished?
+ defined?(@finished) and @finished
+ end
+
def initialize(options)
# Set all of the options we can.
options.each do |option, value|