Sha256: e7a6fcaef6b5c0c39dfb57221408d66a21a9d8824300b987f651c82a1647043f

Contents?: true

Size: 609 Bytes

Versions: 3

Compression:

Stored size: 609 Bytes

Contents

require 'shellwords'

module SimCtl
  class Command
    module Spawn
      # 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
      def spawn(device, path, args=[], opts={})
        Executor.execute(command_for('spawn', device.udid, Shellwords.shellescape(path), *args.map{|a| Shellwords.shellwords(a)})) do |output|
          output
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
simctl-1.6.2 lib/simctl/command/spawn.rb
simctl-1.6.1 lib/simctl/command/spawn.rb
simctl-1.6.0 lib/simctl/command/spawn.rb