Jun 18, 2023
If you need to keep state (= if you need to use the instance more than once!), then by all means use a Ruby class!
Thank you for asking this question - I'll clarify this in the post.
> if that’s your bottleneck, I’d be surprised.
of course not a bottleneck
The main point is that it is not idiomatic, as Ruby provides modules, which can be a better fit.
> Lastly, your module example can grow unwieldy really fast.
You could create separate modules, or as Ruby allows to re-open modules and classes, you could try splitting-up the module into separate files.