In Ruby, I'm creating a small game development framework. Just some personal project - a very small group of friends helping.
Now I am in need of handling geometric concepts. Rectangles, Circles, Polygons, Vectors, Lines, etc. So I made a class for each of these.
I'm stuck deciding whether I should package such classes in a module, such as
Geometry. So I'd access them like
Geometry::Rectangle, or just
Rectangle if I
include the module.
Now then, my question isn't about this specific scenario. I'd like to know, when is it suitable to package similar classes into one module in Ruby? What factors should I consider? Amount of classes? Usage frequency? Complexity?