summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util/classgen.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/util/classgen.rb')
-rw-r--r--lib/puppet/util/classgen.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/puppet/util/classgen.rb b/lib/puppet/util/classgen.rb
index dabbda3d1..8fa2a34cf 100644
--- a/lib/puppet/util/classgen.rb
+++ b/lib/puppet/util/classgen.rb
@@ -154,6 +154,15 @@ module Puppet::Util::ClassGen
end
end
+ [:include, :extend].each do |method|
+ if set = options[method]
+ set = [set] unless set.is_a?(Array)
+ set.each do |mod|
+ klass.send(method, mod)
+ end
+ end
+ end
+
if klass.respond_to? :preinit
klass.preinit
end