Im running this command from ruby script:
system "trad install"
This will prompt me three times for choosing y/n.
Is there a way to automatically choose y,y,n?
echo -e "Y\nN\nN\n" | trad install
You can probably automate a run with Session and Ruby's built-in pty/expect (which seems to have no online documentation). (Dave Thomas has a few brief examples of expect and pty in recent editions of Programming Ruby, if you have a copy of that.)
However, I agree with Dmitry: it's almost certainly easier to adjust trad if possible.