Is there any way to use command line commands in ruby code ?
Like : Some third party .ipa installer command inside ruby code(reinstall the app between scenarios using a 3rd party installer like ideviceinstaller).
Is there any way to use command line commands in ruby code ?
Like : Some third party .ipa installer command inside ruby code(reinstall the app between scenarios using a 3rd party installer like ideviceinstaller).
Kernel#exec
, that replaces your ruby process with the one you specified, as a corresponding syscall. Therefore, it ends the program even if there's more code to run. Probably not what you want. Works like: exec("this")
`this`
will run this
and return its stdout as a string. The same thing with different syntax: %x(this)
Kernel#system
: mostly same as exec
, but doesn't replace your Ruby process and returns a boolean... most of the time: whether it worked successfully (true
), it returned non-zero (false
) or failed to run at all (nil
); runnable as system("this")