Module: SimCtl::Command::Delete

Included in:
SimCtl::Command
Defined in:
lib/simctl/command/delete.rb

Instance Method Summary collapse

Instance Method Details

#delete_all_devicesSimCtl::List

Delete all devices

Returns:

  • (SimCtl::List)

    a list of all deleted SimCtl::Device objects



15
16
17
18
19
20
21
22
# File 'lib/simctl/command/delete.rb', line 15

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

#delete_device(device) ⇒ void

This method returns an undefined value.

Delete a device

Parameters:



8
9
10
# File 'lib/simctl/command/delete.rb', line 8

def delete_device(device)
  Executor.execute(command_for('delete', device.udid))
end