Method: Puppet::Parser::Scope#effective_symtable
- Defined in:
- lib/puppet/parser/scope.rb
#effective_symtable(use_ephemeral) ⇒ Object
Return the effective “table” for setting variables. This method returns the first ephemeral “table” that acts as a local scope, or this scope’s symtable. If the parameter use_ephemeral is true, the “top most” ephemeral “table” will be returned (irrespective of it being a match scope or a local scope).
860 861 862 863 864 865 866 867 868 |
# File 'lib/puppet/parser/scope.rb', line 860 def effective_symtable(use_ephemeral) s = @ephemeral[-1] return s || @symtable if use_ephemeral while s && !s.is_local_scope?() s = s.parent end s || @symtable end |