Text of patch.hexdocs.pm › Patch.Mock.Code.Freezer.html as Styx crawled it on Nov 20, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Patch.Mock.Code.Freezer — patch v0.16.1

View Source Patch.Mock.Code.Freezer (patch v0.16.1) The Code Freezer is a registry that can be used to register and use modules that might be frozen. Modules that Patch relies on must be freezable so that the end-user can Patch them and the frozen versions are still available for internal use. Summary Functions empty() Destroy all frozen modules get(module) Get the possibly-frozen module to use for a module. put(module) Puts a module into the freezer.

Functions Link to this function empty() View Source @spec empty() :: :ok Destroy all frozen modules Link to this function get(module) View Source @spec get(module :: module ()) :: module () Get the possibly-frozen module to use for a module. If the module is frozen then the frozen name will be returned. If the module is not frozen then the module is returned.s Link to this function put(module) View Source @spec put(module :: module ()) :: :ok Puts a module into the freezer.

The module must be freezable. Repeated calls for frozen modules are no-ops.