mirror of
https://github.com/home-assistant/iOS.git
synced 2026-02-08 15:45:13 -06:00
Adds new fastlane lanes: - `fastlane lint` which checks the linters - `fastlane autocorrect` which applies the linters which can autocorrect (Rubocop, SwiftFormat) Adds a build step to the Codegen abstract target which runs SwiftFormat in lint mode, pointing out what it's going to change when run. Applies SwiftFormat to nearly all code -- exempts a few externally-sourced files and generated code.
17 lines
496 B
Swift
17 lines
496 B
Swift
import Foundation
|
|
|
|
public class Event {
|
|
public let Data: [String: Any]
|
|
public let EventType: String
|
|
public let TimeFired: Date
|
|
public let Origin: String
|
|
|
|
init(_ dictionary: [String: Any]) {
|
|
self.Data = dictionary["data"] as? [String: Any] ?? [:]
|
|
// swiftlint:disable force_cast
|
|
self.EventType = dictionary["event_type"] as! String
|
|
self.TimeFired = dictionary["time_fired"] as! Date
|
|
self.Origin = dictionary["origin"] as! String
|
|
}
|
|
}
|