Class: Puppet::Parser::AST::Tag
- Defined in:
- lib/puppet/parser/ast/tag.rb
Overview
The code associated with a class. This is different from components in that each class is a singleton – only one will exist for a given node.
Instance Attribute Summary collapse
Attributes inherited from Branch
Instance Method Summary collapse
Methods inherited from Branch
Constructor Details
This class inherits a constructor from Puppet::Parser::AST::Branch
Instance Attribute Details
Instance Method Details
#evaluate(scope) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/puppet/parser/ast/tag.rb', line 11 def evaluate(scope) types = @type.safeevaluate(scope) types = [types] unless types.is_a? Array types.each do |type| # Now set our class. We don't have to worry about checking # whether we've been evaluated because we're not evaluating # any code. scope.setclass(self.object_id, type) end end |