@@ -2,22 +2,6 @@ import ObjectiveC
22
33extension NSObject {
44
5- @available ( * , deprecated, renamed: " applyHook(for:methodSignature:hookSignature:build:) " )
6- @discardableResult
7- public func addHook< MethodSignature, HookSignature> (
8- for selector: Selector ,
9- methodSignature: MethodSignature . Type ,
10- hookSignature: HookSignature . Type ,
11- implementation: @escaping HookBuilder < MethodSignature , HookSignature >
12- ) throws -> Hook {
13- return try self . applyHook (
14- for: selector,
15- methodSignature: methodSignature,
16- hookSignature: hookSignature,
17- build: implementation
18- )
19- }
20-
215 @available ( * , deprecated, renamed: " applyHook(for:methodSignature:hookSignature:build:) " )
226 @discardableResult
237 public func hook< MethodSignature, HookSignature> (
@@ -31,11 +15,11 @@ extension NSObject {
3115 " There should not be a way to cast an NSObject to AnyClass. "
3216 )
3317
34- return try self . addHook (
18+ return try self . applyHook (
3519 for: selector,
3620 methodSignature: methodSignature,
3721 hookSignature: hookSignature,
38- implementation : build
22+ build : build
3923 )
4024 }
4125
0 commit comments