lib/bolt/pal.rb
# Register all resource types defined in $Project/.resource_types as well as
# the built in types registered with the runtime_3_init method.
Register all resource types defined in $Project/.resource_types as well as
the built in types registered with the runtime_3_init method.
Register all resource types defined in $Project / . resource_types as well as the built in types registered with the runtime_3_init method .
def register_resource_types(loaders)
      static_loader = loaders.static_loader
      static_loader.runtime_3_init
      if File.directory?(@resource_types)
        Dir.children(@resource_types).each do |resource_pp|
          type_name_from_file = File.basename(resource_pp, '.pp').capitalize
          typed_name = Puppet::Pops::Loader::TypedName.new(:type, type_name_from_file)
          resource_type = Puppet::Pops::Types::TypeFactory.resource(type_name_from_file)
          loaders.static_loader.set_entry(typed_name, resource_type)
        end
      end
    end
def register_resource_types ( loaders ) static_loader = loaders . static_loader static_loader . runtime_3_init if File . directory? ( @resource_types ) Dir . children ( @resource_types ) . each do | resource_pp | type_name_from_file = File . basename ( resource_pp , '.pp' ) . capitalize typed_name = Puppet :: Pops :: Loader :: TypedName . new ( :type , type_name_from_file ) resource_type = Puppet :: Pops :: Types :: TypeFactory . resource ( type_name_from_file ) loaders . static_loader . set_entry ( typed_name , resource_type ) end end end
Register all resource types defined in $Project/.resource_types as well as
the built in types registered with the runtime_3_init method.
Register all resource types defined in $Project / . resource_types as well as the built in types registered with the runtime_3_init method .
loaders