Least Significant Bit

Ask Hack Learn Share!

Posts Tagged “ruby”

Antipatterns: Using modules as classes

Imagine a module Calculator defining some methods which then you call like Calculator.sum(1, 2). While this usage of a module is valid in some cases, this time I think we are seeing an antipattern in place. Let's see in my opinion when using a module directly to call methods on it makes sense and when it is an antipattern.