'Register a new plugin, and optionally enable it.
:param class plugin: The implementation class of the plugin
to register.
:param bool enable: If ``True``, immediately enable the
plugin after registration.'

def register(self, plugin, enable=True):

    register_plugin(plugin)
    if enable:
        self.enable(plugin.name)
