summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/config.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/puppet/config.rb b/lib/puppet/config.rb
index 8d7b6b895..5725bcd93 100644
--- a/lib/puppet/config.rb
+++ b/lib/puppet/config.rb
@@ -721,6 +721,10 @@ Generated on #{Time.now}.
@desc = value.gsub(/^\s*/, '')
end
+ def hook=(block)
+ meta_def :handle, &block
+ end
+
# Create the new element. Pretty much just sets the name.
def initialize(args = {})
if args.include?(:parent)
@@ -805,11 +809,16 @@ Generated on #{Time.now}.
if respond_to?(:validate)
validate(value)
end
+
if respond_to?(:munge)
@value = munge(value)
else
@value = value
end
+
+ if respond_to?(:handle)
+ handle(@value)
+ end
end
end