def register(self, recipe):
        """
        Registers a new recipe class.
        """

        if not isinstance(recipe, (list, tuple)):
            recipe = [recipe, ]

        for item in recipe:
            recipe = self.get_recipe_instance_from_class(item)
            self._registry[recipe.slug] = recipe
def register ( self , recipe ) : if not isinstance ( recipe , ( list , tuple ) ) : recipe = [ recipe , ] for item in recipe : recipe = self . get_recipe_instance_from_class ( item ) self . _registry [ recipe . slug ] = recipe
Registers a new recipe class.