Reputation: 1610
Is there a way in ruby to execute a command line utility and have its output displayed in real time, something like myrubyscript rspec
, where myrubyscript
runs rspec
and immediately prints output as it receives it from rspec
?
Currently, if I invoke rspec
with backticks or system
, I don't see the rspec output immediately. Rather, it prints at the end.
Preferably, I want the solution to have block form, so that I run code before and after I exec the passed argument.
Upvotes: 0
Views: 67