         /// The device is not plugged into power; the battery is discharging.
         /// The associated value is in percent.
         case Unplugged(Double)
-
+        
         private init() {
             UIDevice.currentDevice().batteryMonitoringEnabled = true
             let batteryLevel = Double(round(100 * (UIDevice.currentDevice().batteryLevel * 100)) / 100)     // rounded, with 2 digits precision
-
+            
             switch UIDevice.currentDevice().batteryState {
             case .Charging: self = .Charging(batteryLevel)
             case .Full:     self = .Full

        case .Unplugged(let value): return value
        }
    }

}

// MARK: - CustomStringConvertible
extension Device: CustomStringConvertible {

    public var description: String {
        switch self {
        case .iPodTouch5:                   return "iPod Touch 5"

        case .iPadMini2:                    return "iPad Mini 2"
        case .iPadMini3:                    return "iPad Mini 3"
        case .iPadMini4:                    return "iPad Mini 4"
        case .iPadPro:                      return "iPad Pro"
        case .AppleTV:                      return "Apple TV"
        case .Simulator:                    return "Simulator"
        case .UnknownDevice(let identifier):return identifier
        }
    }
    
}

// MARK: - Equatable
