Extract a service object in any Ruby framework
We often talk about extracting service objects in the Ruby community. Very often it’s in the context of Rails apps. However, the technique is very good in any situation where you deal with a framework (“they call you”).
The idea is to separate from the framework as early as possible. This makes the framework only one possible way of calling your code (tests may be another one).
Post a comment