summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-09-03 18:20:04 -0500
committerLuke Kanies <luke@madstop.com>2007-09-03 18:20:04 -0500
commit9d70b9746c09f648efd6a315b3ea088da38ecd1e (patch)
treea8e7335d58008e1e24ed854703b1b9d54cc5a68d /lib/puppet/parser/ast
parentb021587e309f237bd16bd4f5cc51e79266cbd222 (diff)
Removing the Scope#setresource method, since it was essentially redundant. The work is done in either AST::ResourceDef#evaluate or Compile#store_resource.
Diffstat (limited to 'lib/puppet/parser/ast')
-rw-r--r--lib/puppet/parser/ast/resourcedef.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/parser/ast/resourcedef.rb b/lib/puppet/parser/ast/resourcedef.rb
index dfd7c447e..7a43f6b32 100644
--- a/lib/puppet/parser/ast/resourcedef.rb
+++ b/lib/puppet/parser/ast/resourcedef.rb
@@ -90,13 +90,13 @@ class ResourceDef < AST::Branch
# many times.
objtitles.collect { |objtitle|
exceptwrap :type => Puppet::ParseError do
- exp = self.exported || scope.exported
+ exp = self.exported || scope.exported?
# We want virtual to be true if exported is true. We can't
# just set :virtual => self.virtual in the initialization,
# because sometimes the :virtual attribute is set *after*
# :exported, in which case it clobbers :exported if :exported
# is true. Argh, this was a very tough one to track down.
- virt = self.virtual || exported
+ virt = self.virtual || scope.virtual? || exported
obj = Puppet::Parser::Resource.new(
:type => objtype,
:title => objtitle,
@@ -112,7 +112,7 @@ class ResourceDef < AST::Branch
# And then store the resource in the scope.
# XXX At some point, we need to switch all of this to return
# objects instead of storing them like this.
- scope.setresource(obj)
+ scope.compile.store_resource(scope, obj)
obj
end
}.reject { |obj| obj.nil? }