Two OO ways to design something, curious what everyone's thoughts are? This is w/out context of a framework, just purely OO perspective.

Option 1 - Stateless object w/ Rich Result

Option 2 - Stateful object (e.g. command pattern + internal state to store results)

https://gist.github.com/davetron5000/19aa850df641be6c334e9b64a944b6c8

My thoughts follow, but I am not sure which is the "best" pattern - again all things being equal/not in Rails/etc.

stateful.rb

GitHub Gist: instantly share code, notes, and snippets.

Gist
@davetron5000 I think of `do_it` as a special case constructor for a `DoItResult` object. I’d put the stateless one into one class, with the do_it code in a class method. Then you get both value objects and cohesiveness. If ever there is an alternate operation to make a DoItResult, make a new class method constructor.