Class: Puppet::Parser::AST::Tag
- Inherits:
-
Branch
- Object
- Puppet::Parser::AST
- Branch
- Puppet::Parser::AST::Tag
- Defined in:
- lib/vendor/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.
Constant Summary
Constants inherited from Puppet::Parser::AST
Constants included from Util::Docs
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from Branch
Attributes inherited from Puppet::Parser::AST
Attributes included from Util::Docs
Instance Method Summary collapse
Methods inherited from Branch
Methods inherited from Puppet::Parser::AST
associates_doc, #evaluate_match, #initialize, #inspect, #parsefail, #parsewrap, #safeevaluate, settor?, #use_docs
Methods included from Util::Docs
#desc, #dochook, #doctable, #markdown_definitionlist, #markdown_header, #nodoc?, #pad, scrub
Methods included from Util::MethodHelper
#requiredopts, #set_options, #symbolize_options
Methods included from Util::Errors
#adderrorcontext, #devfail, #error_context, #exceptwrap, #fail
Constructor Details
This class inherits a constructor from Puppet::Parser::AST::Branch
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
9 10 11 |
# File 'lib/vendor/puppet/parser/ast/tag.rb', line 9 def type @type end |
Instance Method Details
#evaluate(scope) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/vendor/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 |