|
|
|
|
|
by yason
3828 days ago
|
|
Just wondering, if you want code that reflects the way you think then how do you think about things and models that inherently don't map into objects? I'm kind of the opposite: I rarely use objects (as in methods welded to holders of state) because they only fit in certain domains but when they do they are indispensable. |
|
But in this scenario, I would simply leave the code in an uninstantiated class, called a module in Ruby. I'd organize it as best I can with methods and perhaps submodules. My classes evolve organically as my application grows. Many of my classes start off as modules before I figure out what their state should look like.