I have across the following syntax in a code snippet, and I'm not sure what it does.
class << PushableModule = Module::new
def new *args, &blk
m = Module::new( *args, &blk )
m.extend Pushable
m
end
end
First off, the class or module PushableModule
doesn't exist in the file/program, and secondly what appears to be happening is that I'm retrieving its eigenclass and then setting it equal to Module::new
prior to defining a block, which I just don't understand. Could someone please explain this to me (as well as what the code snippet actually does)?