Skip to content

Instantly share code, notes, and snippets.

@craigmarvelley
Created May 16, 2016 12:48
Show Gist options
  • Save craigmarvelley/ecc3806c096032cb3db1328db7ac4e77 to your computer and use it in GitHub Desktop.
Save craigmarvelley/ecc3806c096032cb3db1328db7ac4e77 to your computer and use it in GitHub Desktop.
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