def register(self, hook):
        """
        Register a hook.

        @hook: a HookBase subclass reference.
        """
        assert callable(hook), \
            "Hook must be a callable"
        assert issubclass(hook, HookBase), \
            "The hook does not inherit from HookBase"

        self._registry.append(hook)