Skip to content

Commit f7956cc

Browse files
committed
Tweaks strategy storage
1 parent 6836949 commit f7956cc

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Sources/InterposeKit/Hooks/Hook.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public final class Hook {
6666
}
6767
}
6868

69-
self._strategy = try makeStrategy(self)
69+
self.strategy = try makeStrategy(self)
7070
}
7171

7272
// ============================================================================ //
@@ -139,12 +139,12 @@ public final class Hook {
139139
// ============================================================================ //
140140
// MARK: Underlying Strategy
141141
// ============================================================================ //
142-
143-
private var _strategy: HookStrategy!
144-
145-
private var strategy: HookStrategy {
146-
self._strategy
147-
}
142+
143+
/// The active strategy used to interpose and manage the method implementation.
144+
///
145+
/// This is an implicitly unwrapped optional, assigned immediately after initialization,
146+
/// as constructing the strategy requires `self` to build the hook proxy.
147+
private var strategy: HookStrategy!
148148

149149
}
150150

0 commit comments

Comments
 (0)