Method: Puppet::Pops::Model::CaseOption.create

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

.create(locator, offset, length, values, then_expr = nil) ⇒ Object



1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'lib/puppet/pops/model/ast.rb', line 1255

def self.create(locator, offset, length, values, then_expr = 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::CaseOption[values]', attrs['values'].type, values)
  ta.assert_instance_of('Puppet::AST::CaseOption[then_expr]', attrs['then_expr'].type, then_expr)
  new(locator, offset, length, values, then_expr)
end