Method: Puppet::Pops::Types::PObjectType#initialize
- Defined in:
- lib/puppet/pops/types/p_object_type.rb
#initialize(name, init_hash_expression) ⇒ PObjectType #initialize(init_hash) ⇒ PObjectType
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize an Object Type instance. The initialization will use either a name and an initialization hash expression, or a fully resolved initialization hash.
441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/puppet/pops/types/p_object_type.rb', line 441 def initialize(_pcore_init_hash, init_hash_expression = nil) # rubocop:disable Lint/UnderscorePrefixedVariableName if _pcore_init_hash.is_a?(Hash) _pcore_init_from_hash(_pcore_init_hash) @loader = init_hash_expression unless init_hash_expression.nil? else @type_parameters = EMPTY_HASH @attributes = EMPTY_HASH @functions = EMPTY_HASH @name = TypeAsserter.assert_instance_of('object name', TYPE_OBJECT_NAME, _pcore_init_hash) @init_hash_expression = init_hash_expression end end |