summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast/resource.rb
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2008-02-13 20:29:00 +1100
committerJames Turnbull <james@lovedthanlost.net>2008-02-13 20:29:00 +1100
commitd3959c497f4c61995f664d88aa3386b54c4baf8d (patch)
tree1a83a85c0c6d626781cad5632db146aeae49d0c9 /lib/puppet/parser/ast/resource.rb
parentc3ead0331adba5f60ea7d508775a89de68e26caa (diff)
parentbcb9b564281003e22d72752d84fa9dc9c8c7107b (diff)
downloadpuppet-d3959c497f4c61995f664d88aa3386b54c4baf8d.tar.gz
puppet-d3959c497f4c61995f664d88aa3386b54c4baf8d.tar.xz
puppet-d3959c497f4c61995f664d88aa3386b54c4baf8d.zip
Merge branch '0.24.x' of git://reductivelabs.com/puppet into 0.24.x
Diffstat (limited to 'lib/puppet/parser/ast/resource.rb')
-rw-r--r--lib/puppet/parser/ast/resource.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/puppet/parser/ast/resource.rb b/lib/puppet/parser/ast/resource.rb
index c53ab0a68..8a60522a3 100644
--- a/lib/puppet/parser/ast/resource.rb
+++ b/lib/puppet/parser/ast/resource.rb
@@ -9,15 +9,13 @@ class Resource < AST::ResourceReference
# Does not actually return an object; instead sets an object
# in the current scope.
- def evaluate(options)
- scope = options[:scope]
-
+ def evaluate(scope)
# Evaluate all of the specified params.
paramobjects = @params.collect { |param|
- param.safeevaluate(:scope => scope)
+ param.safeevaluate(scope)
}
- objtitles = @title.safeevaluate(:scope => scope)
+ objtitles = @title.safeevaluate(scope)
# it's easier to always use an array, even for only one name
unless objtitles.is_a?(Array)
@@ -50,10 +48,10 @@ class Resource < AST::ResourceReference
:scope => scope
)
- # And then store the resource in the compile.
+ # And then store the resource in the compiler.
# At some point, we need to switch all of this to return
# objects instead of storing them like this.
- scope.compile.store_resource(scope, obj)
+ scope.compiler.add_resource(scope, obj)
obj
end
}.reject { |obj| obj.nil? }