Created
May 16, 2016 12:48
-
-
Save craigmarvelley/ecc3806c096032cb3db1328db7ac4e77 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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