Skip to content

Commit 1f53cdd

Browse files
authored
Fix first example in README (#22)
Calling `hook` will lead to an error where the state is expected to be prepared. The `Interpose(…builder:)` initializer used here automatically applies prepared hooks.
1 parent 7a9367e commit 1f53cdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class TestClass: NSObject {
3131
}
3232

3333
let interposer = try Interpose(TestClass.self) {
34-
try $0.hook(
34+
try $0.prepareHook(
3535
#selector(TestClass.sayHi),
3636
methodSignature: (@convention(c) (AnyObject, Selector) -> String).self,
3737
hookSignature: (@convention(block) (AnyObject) -> String).self) {

0 commit comments

Comments
 (0)