class Spaceship::Portal::Device
def find_by_udid(device_udid, mac: false)
-
(Device)
- Find a device based on the UDID of the device. nil if no device was found.
Parameters:
-
mac
(Bool
) -- Searches for Macs if true
def find_by_udid(device_udid, mac: false) all(mac: mac).find do |device| device.udid.casecmp(device_udid) == 0 end end