Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@implementation ExampleAssembly
- (MyModel *)model {
return [TyphoonDefinition withClass:[MyModel class]
configuration:^(TyphoonDefinition* definition) {
[definition useInitializer:@selector(initWithDependency:)
parameters:^(TyphoonMethod *initializer) {
[initializer injectParameterWith:[self exampleDependency]];
}];
}];
}
- (Dependency *)exampleDependency {
return [TyphoonDefinition withClass:[Dependency class]];
}
@end
ExampleAssembly *assembly = [[ExampleAssembly new] activate];
MyModel *model = [assembly model];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment