Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
JSObjectionInjector *injector = [JSObjection createInjector];
[injector bindBlock:^(JSObjectionInjector *context) {
MyModel *model = [[MyModel alloc] initWithDependency:context.getObject([Dependency class])];
return model;
} toClass:[MyModel class]];
id myModel = [injector getObject:[MyModel class]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment