Renamed Polymorphic mapping to dynamic mapping after consulting with the community. Dropped abstract superclass in favor of a RKObjectMappingDefinition protocol. Caught missing cases with dynamic object mapping + targetObject. Updated docs and method signatures to reflect the updates.

This commit is contained in:
Blake Watters
2011-07-31 19:37:42 -04:00
parent eab35ef3f7
commit 4e03ba7bef
27 changed files with 315 additions and 268 deletions

View File

@@ -10,6 +10,10 @@
@implementation RKObjectMappingProvider
+ (RKObjectMappingProvider*)mappingProvider {
return [[self new] autorelease];
}
- (id)init {
if ((self = [super init])) {
_objectMappings = [NSMutableArray new];
@@ -30,7 +34,7 @@
[_mappingsByKeyPath setValue:mapping forKey:keyPath];
}
- (RKObjectAbstractMapping*)mappingForKeyPath:(NSString*)keyPath {
- (id<RKObjectMappingDefinition>)mappingForKeyPath:(NSString*)keyPath {
return [_mappingsByKeyPath objectForKey:keyPath];
}