summaryrefslogtreecommitdiffstats
path: root/lib/puppet/transportable.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-08-23 13:25:40 -0500
committerLuke Kanies <luke@madstop.com>2007-08-23 13:25:40 -0500
commit724fef1269bd593496bca9827a0ad7d9361e92d4 (patch)
tree8b8fb73ee625680bcbc3913e2ee007c8b344f44f /lib/puppet/transportable.rb
parent3d68ed66ca7545c26b83a4c921d21f5aad710ee0 (diff)
downloadpuppet-724fef1269bd593496bca9827a0ad7d9361e92d4.tar.gz
puppet-724fef1269bd593496bca9827a0ad7d9361e92d4.tar.xz
puppet-724fef1269bd593496bca9827a0ad7d9361e92d4.zip
Everything up to the parser (and the Modules) is ready to support multiple environments, including the parser having an environment setting. I have also created my first spec-based tests, for the interpreter (and deleted the old test/unit tests).
Diffstat (limited to 'lib/puppet/transportable.rb')
-rw-r--r--lib/puppet/transportable.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/puppet/transportable.rb b/lib/puppet/transportable.rb
index aa7eb92f7..acd69fb0c 100644
--- a/lib/puppet/transportable.rb
+++ b/lib/puppet/transportable.rb
@@ -100,6 +100,19 @@ module Puppet
end
}
+ # Copy a scope's type and name.
+ def copy_type_and_name(scope)
+ case scope.type
+ when "": self.type = "main"
+ when nil: devfail "A Scope with no type"
+ else
+ self.type = scope.type
+ end
+ if scope.name
+ self.name = scope.name
+ end
+ end
+
# Remove all collectable objects from our tree, since the client
# should not see them.
def collectstrip!