summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast/vardef.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-02-08 14:25:52 -0600
committerLuke Kanies <luke@madstop.com>2008-02-08 14:25:52 -0600
commit5a0e34b4f8da22e1830ec7d0a730c3686665bceb (patch)
treed8635f754c2a0fee69e103cf6d85792ff4e736a1 /lib/puppet/parser/ast/vardef.rb
parent82720d5327b30839a29035ee0b498b940ffc7a5a (diff)
downloadpuppet-5a0e34b4f8da22e1830ec7d0a730c3686665bceb.tar.gz
puppet-5a0e34b4f8da22e1830ec7d0a730c3686665bceb.tar.xz
puppet-5a0e34b4f8da22e1830ec7d0a730c3686665bceb.zip
Refactoring the AST classes just a bit. I realized that
all of the evaluate() methods only ever accepted a scope, and sometimes one other option, so I switched them all to use named arguments instead of a hash.
Diffstat (limited to 'lib/puppet/parser/ast/vardef.rb')
-rw-r--r--lib/puppet/parser/ast/vardef.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/puppet/parser/ast/vardef.rb b/lib/puppet/parser/ast/vardef.rb
index 1e7f874bc..ee79159d7 100644
--- a/lib/puppet/parser/ast/vardef.rb
+++ b/lib/puppet/parser/ast/vardef.rb
@@ -9,10 +9,9 @@ class Puppet::Parser::AST
# Look up our name and value, and store them appropriately. The
# lexer strips off the syntax stuff like '$'.
- def evaluate(hash)
- scope = hash[:scope]
- name = @name.safeevaluate(:scope => scope)
- value = @value.safeevaluate(:scope => scope)
+ def evaluate(scope)
+ name = @name.safeevaluate(scope)
+ value = @value.safeevaluate(scope)
parsewrap do
scope.setvar(name,value, @file, @line)