mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-05-11 18:11:33 +08:00
Improved the flexibility of the block loaders significantly by allowing them to override the object mapping and routing selection. Made sendObject:method:delegate:block private and introduced public sendObject:delegate:block method instead. Wrote some basic specs for overriding the router.
This commit is contained in:
@@ -33,6 +33,8 @@ NSString* const RKObjectMappingNestingAttributeKeyName = @"<RK_NESTING_ATTRIBUTE
|
||||
return [self mappingForClass:[NSMutableDictionary class]];
|
||||
}
|
||||
|
||||
#if NS_BLOCKS_AVAILABLE
|
||||
|
||||
+ (id)mappingForClass:(Class)objectClass block:(void(^)(RKObjectMapping*))block {
|
||||
RKObjectMapping* mapping = [self mappingForClass:objectClass];
|
||||
block(mapping);
|
||||
@@ -45,6 +47,7 @@ NSString* const RKObjectMappingNestingAttributeKeyName = @"<RK_NESTING_ATTRIBUTE
|
||||
return mapping;
|
||||
}
|
||||
|
||||
#endif // NS_BLOCKS_AVAILABLE
|
||||
|
||||
- (id)init {
|
||||
self = [super init];
|
||||
|
||||
Reference in New Issue
Block a user