Class Puppet::Parser::TemplateWrapper
In: lib/puppet/parser/templatewrapper.rb
Parent: Object

Methods

all_tags   classes   file=   has_variable?   method_missing   new   result   scope   tags   to_s  

Included Modules

Puppet::Util

Attributes

file  [R] 
scope  [W] 
string  [RW] 

Public Class methods

Public Instance methods

Allow templates to access the all the defined tags

Allow templates to access the defined classes

Should return true if a variable is defined, false if it is not

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 tree (Kernel#fork) and variable names (fork => "yes/no") could arise.

Worse, /new/ conflicts could pop up when a new kernel or object method was added to Ruby, causing templates to suddenly fail mysteriously when Ruby was upgraded.

To ensure that legacy templates using unqualified names work we retain the missing_method definition here until we declare the syntax finally dead.

Allow templates to access the tags defined in the current scope

[Validate]