I have the following code in a viewmodel:
@weakify(self);
[RACAbleWithStart(self.visitStartDate) subscribeNext:^(NSDate *visitStartDate) {
@strongify(self);
self.visit.startDate = visitStartDate;
}];
[RACAbleWithStart(self.visitEndDate) subscribeNext:^(NSDate *visitEndDate) {
@strongify(self);
self.visit.endDate = visitEndDate;
}];
[RACAbleWithStart(self.visitFocus) subscribeNext:^(NSString *focus) {
@strongify(self);
self.visit.actionPlan.focus = focus;
}];
[RACAbleWithStart(self.allDayVisit) subscribeNext: ^(NSNumber *allDayVisit) {
@strongify(self);
self.visit.allDay = allDayVisit;
}];
It is basically binding properties onto a private property. Is this totally the wrong way of going about this or is there a tidier way of writing the above code?