My app can be user configured to use different “rules”. Models should use these rules to do calculations.
Something like:
rules = Rules.create({config: {}});
rules.calculateWinner(instanceOfClassA);
rules.calculateStats(instanceOfClassB);
Where should I place the Rules class? Should it be a service?
I could move the calculateSomething() methods to the models and feed it the Rules instance as a param, but I don’t want to create huge models.