e per each pair of parameters) based on the template rule function `func`, and attaches them to `cls`. The rule function's parameters must be accessible via its `_params` attribute. c