class SomeQuery
include ModelQuery[User]
...
endModelQueryis a moduleUseris a class- It's a "ModelQuery of User"
- The syntax is an approximation of parameterized types or generics used in other programming languages
- Got the idea from Piotr Solnica in his article Subclassing Module For Fun and Profit
SomeQueryis just a class that represents an encapsulation of some query logic. It's not germane to demonstrating the technique.