|
|
|
|
|
by bradly
219 days ago
|
|
I think this is the pattern I would reach for as well, separating the data from the execution. Being declarative about the plans (either with a config file, db backend, or simply a PORO) allows the plans themselves to be agnostic to how they are used and leaves you room to write a clean API for their creation without mixing in their definition. Also ActiveSupport has Object#with_options which has a similar intent, but I rarely ever see it used in codebases. |
|