A builder specialized for multibind - checks that type is Array or Hash based. A new builder sets the multibinding to be of type Hash.
@api public
Overrides the default implementation that will raise an exception as a multibind requires a hash type. Thus, if nothing else is requested, a multibind will be configured as Hash.
# File lib/puppet/pops/binder/bindings_factory.rb, line 587 def data() hash_of_data() end
Constraints type to be one of {Puppet::Pops::Types::PArrayType PArrayType}, or {Puppet::Pops::Types::PHashType PHashType}. @raise [ArgumentError] if type constraint is not met. @api public
# File lib/puppet/pops/binder/bindings_factory.rb, line 576 def type(type) unless type.class == Puppet::Pops::Types::PArrayType || type.class == Puppet::Pops::Types::PHashType raise ArgumentError, "Wrong type; only PArrayType, or PHashType allowed, got '#{type.to_s}'" end model.type = type self end