PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
| Dir : /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/types/ |
| Server: Linux server1.ngambekcore.com 4.18.0-553.51.1.el8_10.x86_64 #1 SMP Wed Apr 30 04:00:07 EDT 2025 x86_64 IP: 159.198.77.92 |
| Dir : //opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/types/annotatable.rb |
module Puppet::Pops
module Types
KEY_ANNOTATIONS = 'annotations'.freeze
# Behaviour common to all Pcore annotatable classes
#
# @api public
module Annotatable
TYPE_ANNOTATIONS = PHashType.new(PTypeType.new(PTypeReferenceType.new('Annotation')), PHashType::DEFAULT)
# @return [{PTypeType => PStructType}] the map of annotations
# @api public
def annotations
@annotations.nil? ? EMPTY_HASH : @annotations
end
# @api private
def init_annotatable(init_hash)
@annotations = init_hash[KEY_ANNOTATIONS].freeze
end
# @api private
def annotatable_accept(visitor, guard)
@annotations.each_key { |key| key.accept(visitor, guard) } unless @annotations.nil?
end
# @api private
def _pcore_init_hash
result = {}
result[KEY_ANNOTATIONS] = @annotations unless @annotations.nil?
result
end
end
end
end