Class: Puppet::Pops::Model::Application

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

Instance Attribute Summary

Attributes inherited from NamedDefinition

#body, #name, #parameters

Attributes inherited from Positioned

#length, #locator, #offset

Attributes inherited from PopsObject

#hash

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from NamedDefinition

#_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::NamedDefinition

Class Method Details

._pcore_typeObject


2059
2060
2061
2062
2063
# File 'lib/puppet/pops/model/ast.rb', line 2059

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

Instance Method Details

#_pcore_all_contents(path, &block) ⇒ Object


2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
# File 'lib/puppet/pops/model/ast.rb', line 2070

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

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

Yields:


2065
2066
2067
2068
# File 'lib/puppet/pops/model/ast.rb', line 2065

def _pcore_contents
  @parameters.each { |value| yield(value) }
  yield(@body) unless @body.nil?
end