summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/templatewrapper.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/puppet/parser/templatewrapper.rb b/lib/puppet/parser/templatewrapper.rb
index 3b74e62d4..fc716b0fd 100644
--- a/lib/puppet/parser/templatewrapper.rb
+++ b/lib/puppet/parser/templatewrapper.rb
@@ -37,6 +37,16 @@ class Puppet::Parser::TemplateWrapper
end
end
+ # Allow templates to access the defined classes
+ def classes
+ return scope.catalog.classes
+ end
+
+ # Allow templates to access the defined tags
+ def tags
+ return scope.catalog.tags
+ end
+
# Ruby treats variables like methods, so we used to expose variables
# within scope to the ERB code via method_missing. As per RedMine #1427,
# though, this means that conflicts between methods in our inheritance