-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block definitions #475
Block definitions #475
Conversation
…onDefinition+Internal
…TyphoonAssemblyDefinitionBuilder
…sembly & assembly definition builder
@@ -30,4 +32,13 @@ - (id)anotherKnight | |||
}]; | |||
} | |||
|
|||
- (id)blockKnight | |||
{ | |||
return [TyphoonBlockDefinition withClass:[Knight class] block:^id{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is duplication of Knight
class reference intentional? I mean, it's being used there and later in [[Knight alloc] init]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We need to know the component type beforehand so Typhoon would be able to use this definition for auto-injections and injections by property type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thank you @nickynick |
Congrats! A great feature! |
🎉 🍻 Thanks! I'll get on docs and stuff like that shortly. |
This is the implementation of an idea from #467. Please see
TyphoonBlockDefinition
for details :) There is already a bunch of tests for this - not sure if that's enough, but it's something to begin with. I'll be adding some docs shortly.As a bonus, I also felt entitled to do some cleanup & reorganizing. In particular, all infrastructure-related stuff was moved from
Typhoon.h
umbrella header toTyphoon+Infrastructure.h
. I feel like that's the way to go with all the stuff which is not intended for basic usage.