Class: Puppet::Parser::AST::ResourceDefaults
- Defined in:
- lib/puppet/parser/ast/resource_defaults.rb
Overview
A statement syntactically similar to an ResourceDef, but uses a capitalized object type and cannot have a name.
Instance Attribute Summary collapse
Attributes inherited from Branch
Instance Method Summary collapse
-
#evaluate(scope) ⇒ Object
As opposed to ResourceDef, this stores each default for the given object type.
Methods inherited from Branch
Constructor Details
This class inherits a constructor from Puppet::Parser::AST::Branch
Instance Attribute Details
#parameters ⇒ Object
7 8 9 |
# File 'lib/puppet/parser/ast/resource_defaults.rb', line 7 def parameters @parameters end |
Instance Method Details
#evaluate(scope) ⇒ Object
As opposed to ResourceDef, this stores each default for the given object type.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/puppet/parser/ast/resource_defaults.rb', line 13 def evaluate(scope) # Use a resource reference to canonize the type ref = Puppet::Resource.new(@type, "whatever") type = ref.type params = @parameters.safeevaluate(scope) parsewrap do scope.define_settings(type, params) end end |