Class: Puppet::Pops::Model::CallFunctionExpression

Inherits:
CallExpression show all
Defined in:
lib/puppet/pops/model/ast.rb

Instance Attribute Summary

Attributes inherited from CallExpression

#arguments, #functor_expr, #lambda, #rval_required

Attributes inherited from Positioned

#length, #locator, #offset

Attributes inherited from PopsObject

#hash

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CallExpression

#_pcore_init_hash, create, #eql?, from_asserted_hash, from_hash, #initialize

Methods inherited from Positioned

#_pcore_init_hash, create, #file, from_asserted_hash, from_hash, #initialize, #line, #pos

Methods inherited from PopsObject

#_pcore_init_hash, create, #eql?, from_asserted_hash, from_hash, #initialize, #to_s

Methods included from Types::PuppetObject

#_pcore_init_hash, #_pcore_type, #to_s

Constructor Details

This class inherits a constructor from Puppet::Pops::Model::CallExpression

Class Method Details

._pcore_typeObject



3112
3113
3114
3115
3116
# File 'lib/puppet/pops/model/ast.rb', line 3112

def self._pcore_type
  @_pcore_type ||= Types::PObjectType.new('Puppet::AST::CallFunctionExpression', {
                                            'parent' => CallExpression._pcore_type
                                          })
end

Instance Method Details

#_pcore_all_contents(path, &block) ⇒ Object



3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
# File 'lib/puppet/pops/model/ast.rb', line 3124

def _pcore_all_contents(path, &block)
  path << self
  unless @functor_expr.nil?
    block.call(@functor_expr, path)
    @functor_expr._pcore_all_contents(path, &block)
  end
  @arguments.each do |value|
    block.call(value, path)
    value._pcore_all_contents(path, &block)
  end
  unless @lambda.nil?
    block.call(@lambda, path)
    @lambda._pcore_all_contents(path, &block)
  end
  path.pop
end

#_pcore_contents {|@functor_expr| ... } ⇒ Object

Yields:



3118
3119
3120
3121
3122
# File 'lib/puppet/pops/model/ast.rb', line 3118

def _pcore_contents
  yield(@functor_expr) unless @functor_expr.nil?
  @arguments.each { |value| yield(value) }
  yield(@lambda) unless @lambda.nil?
end