Yet another way to call ruby script from DLL

I’ve searched that forum for the subject and found that most questions
are about calling DLL functions from ruby and only two questions
(Ruby into a .dll? - Ruby - Ruby-Forum
How to use Ruby interpreter as Windows DLL library? - Ruby - Ruby-Forum) about calling ruby script
from DLL.

I wonder how can I utilize ruby in writing rules for openholdem (an open
source framework for p_oker bot creation). It provides an interface to
bind to external user written DLL, which I think could be used to call
ruby script.

The solution is a kind of middleware DLL, which is to be bound to
openholdem interface. That DLL’s should marshal its functions calls to
strings, pass them to ruby interpreteur over stdin, read responses from
stdout, convert from string to bin struct and return back to openholdem.

Is that right way of calling ruby script from a DLL?