Method: Puppet::Pops::Model::NamedDefinition.create

Defined in:
lib/puppet/pops/model/ast.rb

.create(locator, offset, length, name, parameters = _pcore_type['parameters'].value, body = nil) ⇒ Object



1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
# File 'lib/puppet/pops/model/ast.rb', line 1929

def self.create(locator, offset, length, name, parameters = _pcore_type['parameters'].value, body = nil)
  ta = Types::TypeAsserter
  attrs = _pcore_type.attributes(true)
  ta.assert_instance_of('Puppet::AST::Positioned[locator]', attrs['locator'].type, locator)
  ta.assert_instance_of('Puppet::AST::Positioned[offset]', attrs['offset'].type, offset)
  ta.assert_instance_of('Puppet::AST::Positioned[length]', attrs['length'].type, length)
  ta.assert_instance_of('Puppet::AST::NamedDefinition[name]', attrs['name'].type, name)
  ta.assert_instance_of('Puppet::AST::NamedDefinition[parameters]', attrs['parameters'].type, parameters)
  ta.assert_instance_of('Puppet::AST::NamedDefinition[body]', attrs['body'].type, body)
  new(locator, offset, length, name, parameters, body)
end