Ruby script as Linux dynamic library


[insert customary disclaimer that I’ve tried to find the answer to this

Is there a way to set a ruby module as a Linux dynamic library? Like,
the module (or script or whatever it would be called) could be bound to
by programs in much the same way that they can bind to the SQLite