We have a class that has a whole bunch of little helpers, a la:
def is_processing?
state == PROCESSING_STATE
end
or
def activate
ActivationService.call(self)
end
All of these are useful, and as clean and DRY as we can make them. The services are also clean and concise. But the core models of our system all have enormous model files, which seems like a smell. All advice I've found for slimming up a model is to refactor methods or extract out building logic in to services/factories, which we have done. Where do we go from here? Modules build for just one class?
Aucun commentaire:
Enregistrer un commentaire