summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/scope.rb
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-08-22 21:27:11 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-08-22 21:27:11 +0000
commit1b2ee4bb9d9fef44bdf8217f45d6893b7609a432 (patch)
treeeeab100adbabf62c809082f8a9ee0b469d017bec /lib/puppet/parser/scope.rb
parentea32a38d73dc4c1dec030c2c52d339e8976b881b (diff)
downloadpuppet-1b2ee4bb9d9fef44bdf8217f45d6893b7609a432.tar.gz
puppet-1b2ee4bb9d9fef44bdf8217f45d6893b7609a432.tar.xz
puppet-1b2ee4bb9d9fef44bdf8217f45d6893b7609a432.zip
Adding "if/else" constructs. No operators, no elsif, but it is a good start, anyway.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1483 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser/scope.rb')
-rw-r--r--lib/puppet/parser/scope.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb
index 8d5937217..f800c38ec 100644
--- a/lib/puppet/parser/scope.rb
+++ b/lib/puppet/parser/scope.rb
@@ -95,6 +95,16 @@ module Puppet::Parser
@@declarative = val
end
+ # Is the value true? This allows us to control the definition of truth
+ # in one place.
+ def self.true?(value)
+ if value == false or value == ""
+ return false
+ else
+ return true
+ end
+ end
+
# Add all of the defaults for a given object to that object.
def adddefaults(obj)
defaults = lookupdefaults(obj.type)