module SimCtl::Command::Spawn
Public Instance Methods
spawn(device, path, args = [], _opts = {})
click to toggle source
Spawn
a process on a device
@param device [SimCtl::Device] the device to spawn a process on @param path [String] path to executable @param args [Array] arguments for the executable @return [String] standard output the spawned process generated
# File lib/simctl/command/spawn.rb, line 12 def spawn(device, path, args = [], _opts = {}) escaped_path = Shellwords.shellescape(path) command = command_for('spawn', device.udid, escaped_path, *args.map { |a| Shellwords.shellwords(a) }) Executor.execute(command) do |output| output end end