What if you wanted to accommodate different toast-making processes, rather than having one constant method of doing so. Maybe I want to make kid toast, which involves cutting off the edges, but only after I've applied the butter and the jam. Or maybe when I'm making low-carb toast, I can't use any jam.
How would you incorporate those rules into the available injections?
Cutting off the crust would be another step, so we would need to update our protocol. We could have a Plating behavior that would let you trim or cut or otherwise spruce up your toast
Rules about which kinds of bread can use which kinds of jams are outside of the scope of our defined protocol. We would have to have a system in place for building the set of behaviors programmatically, and we could encode those rules in that system, maybe as some kind of validator.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
What if you wanted to accommodate different toast-making processes, rather than having one constant method of doing so. Maybe I want to make kid toast, which involves cutting off the edges, but only after I've applied the butter and the jam. Or maybe when I'm making low-carb toast, I can't use any jam.
How would you incorporate those rules into the available injections?
Great questions!