If I understand what you need is to pass the outworking of command ruby
as an argument for another program, in windows I believe that will need to store the value in a variable, ways I managed to get the result were:
Store the result in a file
This way will generate a file called resultado.tmp
with the response of the command executed with ruby
and then will set this value in the variable, soon after deleting the file (as it will no longer use):
ruby -e"puts 'Oh ' * 3" > resultado.tmp
set COMANDO_RUBY=<resultado.tmp
del resultado.tmp
programa.exe %COMANDO_RUBY%
FOR and usebackq
We have the option to use the FOR and he has the option called usebackq
which causes whatever is between the accents to be executed:
`string que será executada`
The command should look like this:
FOR /F "usebackq" %i IN (`ruby -e"puts 'Oh ' * 3"`) DO SET COMANDO_RUBY=%i
programa.exe %COMANDO_RUBY%