Sha256: dd08b0d31a61094f07376030b11b535148df3597b9ff2a5505e22e75bb3858a2

Contents?: true

Size: 637 Bytes

Versions: 7

Compression:

Stored size: 637 Bytes

Contents

module SimCtl
  class Command
    module Delete
      # Delete a device
      #
      # @param device [SimCtl::Device] the device to delete
      # @return [void]
      def delete_device(device)
        Executor.execute(command_for('delete', device.udid))
      end

      # Delete all devices
      #
      # @return [SimCtl::List] a list of all deleted SimCtl::Device objects
      def delete_all_devices
        list_devices.each do |device|
          device.kill
          device.shutdown if device.state != :shutdown
          device.wait { |d| d.state == :shutdown }
          device.delete
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
simctl-1.6.10 lib/simctl/command/delete.rb
simctl-1.6.8 lib/simctl/command/delete.rb
simctl-1.6.7 lib/simctl/command/delete.rb
simctl-1.6.6 lib/simctl/command/delete.rb
simctl-1.6.5 lib/simctl/command/delete.rb
simctl-1.6.4 lib/simctl/command/delete.rb
simctl-1.6.3 lib/simctl/command/delete.rb