Here's an example of using a factory component with trailing closure syntax. Just about all of the TyphoonDefinition methods have the block/closure as the last parameter, so you can use the traling closure syntax. I find this a little easier to read in Swift.
public dynamic func motherOfKnights() -> AnyObject {
return TyphoonDefinition.withClass(MotherOfKnights.self)
}
public dynamic func brandNewBabyKnight() -> AnyObject {
return TyphoonDefinition.withFactory(self.motherOfKnights(),
selector: "makeKnight:") {
(factoryMethod) in
factoryMethod.injectParameterWith("Robert")
}
}