From bc2b292c88035dcfc41fc7e3d8021689e624d137 Mon Sep 17 00:00:00 2001 From: iamharshdev Date: Mon, 9 Sep 2024 16:36:14 +0530 Subject: [PATCH] Add initializer to `WorkerNotification` --- .../TheBoringWorkerNotifier/TheBoringWorkerNotifier.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/TheBoringWorkerNotifier/TheBoringWorkerNotifier.swift b/Sources/TheBoringWorkerNotifier/TheBoringWorkerNotifier.swift index 5dec038..b73422c 100644 --- a/Sources/TheBoringWorkerNotifier/TheBoringWorkerNotifier.swift +++ b/Sources/TheBoringWorkerNotifier/TheBoringWorkerNotifier.swift @@ -6,6 +6,11 @@ import Foundation public struct WorkerNotification { public var name: String public var handler: (Notification) -> Void + + public init(name: String, handler: @escaping (Notification) -> Void) { + self.name = name + self.handler = handler + } } public class TheBoringWorkerNotifier {