module Puppet::Pops::Types::Annotatable
Behaviour common to all Pcore
annotatable classes
@api public
Constants
- TYPE_ANNOTATIONS
Public Instance Methods
_pcore_init_hash()
click to toggle source
@api private
# File lib/puppet/pops/types/annotatable.rb 29 def _pcore_init_hash 30 result = {} 31 result[KEY_ANNOTATIONS] = @annotations unless @annotations.nil? 32 result 33 end
annotatable_accept(visitor, guard)
click to toggle source
@api private
# File lib/puppet/pops/types/annotatable.rb 24 def annotatable_accept(visitor, guard) 25 @annotations.each_key { |key| key.accept(visitor, guard) } unless @annotations.nil? 26 end
annotations()
click to toggle source
@return [{PTypeType => PStructType}] the map of annotations @api public
# File lib/puppet/pops/types/annotatable.rb 14 def annotations 15 @annotations.nil? ? EMPTY_HASH : @annotations 16 end
init_annotatable(init_hash)
click to toggle source
@api private
# File lib/puppet/pops/types/annotatable.rb 19 def init_annotatable(init_hash) 20 @annotations = init_hash[KEY_ANNOTATIONS].freeze 21 end