diff options
author | Luke Kanies <luke@madstop.com> | 2008-05-20 10:19:10 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-05-20 10:19:10 -0500 |
commit | fe157f239a301abb52f81c62719355c8e50c970c (patch) | |
tree | 2ff683d14dbf5c95a99410fe1d12300368cf497e /lib/puppet/util/variables.rb | |
parent | 3cb0d60d3d0870f1d9ac83e5dbeaa06d2888231f (diff) | |
parent | 84a787a2a764a5035f7cbb8d30f94fc601bed154 (diff) | |
download | puppet-fe157f239a301abb52f81c62719355c8e50c970c.tar.gz puppet-fe157f239a301abb52f81c62719355c8e50c970c.tar.xz puppet-fe157f239a301abb52f81c62719355c8e50c970c.zip |
Merge branch '0.24.x'
Conflicts:
CHANGELOG
spec/integration/defaults.rb
spec/integration/node/catalog.rb
spec/unit/rails.rb
spec/unit/type/mount.rb
Diffstat (limited to 'lib/puppet/util/variables.rb')
-rw-r--r-- | lib/puppet/util/variables.rb | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/lib/puppet/util/variables.rb b/lib/puppet/util/variables.rb deleted file mode 100644 index 1a78ef5c1..000000000 --- a/lib/puppet/util/variables.rb +++ /dev/null @@ -1,38 +0,0 @@ -module Puppet::Util::Variables - def inithooks - @instance_init_hooks.dup - end - - def initvars - return unless defined? @class_init_hooks - self.inithooks.each do |var, value| - if value.is_a?(Class) - instance_variable_set("@" + var.to_s, value.new) - else - instance_variable_set("@" + var.to_s, value) - end - end - end - - def instancevar(hash) - @instance_init_hooks ||= {} - - unless method_defined?(:initvars) - define_method(:initvars) do - self.class.inithooks.each do |var, value| - if value.is_a?(Class) - instance_variable_set("@" + var.to_s, value.new) - else - instance_variable_set("@" + var.to_s, value) - end - end - end - end - hash.each do |var, value| - raise("Already initializing %s" % var) if @instance_init_hooks[var] - - @instance_init_hooks[var] = value - end - end -end - |