Update rules.py

edit line 153.
This change will allow for class function (methods) to be used as callback
Merged pull request in emats:patch-1