This is not a class. This is a method defined on Object(although there is a class called with the same name CSV). The document you linked is misleading. This explains it better.
You cannot do this with a module, but you can define a method that takes a block.
source
share