Method: Copland::Registry#fixate!

Defined in:
lib/copland/registry.rb

#fixate!Object

Fixates the registry. This performs one-time operations on the registry, and then makes it illegal to perform those operations subsequently on the same registry instance.

This will create the “copland.Registry” service point, fixate each of the registry’s packages, and then register a finalizer in ObjectSpace that will cause the registry to always be gracefully shutdown.



141
142
143
144
145
146
147
# File 'lib/copland/registry.rb', line 141

def fixate!
  define_self_as_service
  define_log_factory_as_service
  @packages.each { |id, pkg| pkg.fixate! }
  ObjectSpace.define_finalizer( self, proc { shutdown } )
  extend Fixated
end