Class: Puppet::Parser::AST::ResourceParam
- Inherits:
-
Branch
- Object
- Puppet::Parser::AST
- Branch
- Puppet::Parser::AST::ResourceParam
- Defined in:
- lib/vendor/puppet/parser/ast/resourceparam.rb
Overview
The AST object for the parameters inside ResourceDefs and Selectors.
Constant Summary
Constants inherited from Puppet::Parser::AST
Constants included from Util::Docs
Instance Attribute Summary collapse
-
#add ⇒ Object
Returns the value of attribute add.
-
#param ⇒ Object
Returns the value of attribute param.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Branch
Attributes inherited from Puppet::Parser::AST
Attributes included from Util::Docs
Instance Method Summary collapse
- #each ⇒ Object
-
#evaluate(scope) ⇒ Object
Return the parameter and the value.
- #to_s ⇒ Object
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
#add ⇒ Object
Returns the value of attribute add.
6 7 8 |
# File 'lib/vendor/puppet/parser/ast/resourceparam.rb', line 6 def add @add end |
#param ⇒ Object
Returns the value of attribute param.
6 7 8 |
# File 'lib/vendor/puppet/parser/ast/resourceparam.rb', line 6 def param @param end |
#value ⇒ Object
Returns the value of attribute value.
6 7 8 |
# File 'lib/vendor/puppet/parser/ast/resourceparam.rb', line 6 def value @value end |
Instance Method Details
#each ⇒ Object
8 9 10 |
# File 'lib/vendor/puppet/parser/ast/resourceparam.rb', line 8 def each [@param,@value].each { |child| yield child } end |
#evaluate(scope) ⇒ Object
Return the parameter and the value.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/vendor/puppet/parser/ast/resourceparam.rb', line 13 def evaluate(scope) return Puppet::Parser::Resource::Param.new( :name => @param, :value => @value.safeevaluate(scope), :source => scope.source, :line => self.line, :file => self.file, :add => self.add ) end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/vendor/puppet/parser/ast/resourceparam.rb', line 25 def to_s "#{@param} => #{@value.to_s}" end |