Incorporate code review feedback

This commit is contained in:
Jeff Arena
2012-01-31 15:15:19 -05:00
committed by Blake Watters
parent 1cd22d5b33
commit 32ab17fe0b
4 changed files with 79 additions and 73 deletions

View File

@@ -60,9 +60,8 @@
NSMutableDictionary *cachedObjectsForEntity = [_entityCache objectForKey:entity.name];
if (cachedObjectsForEntity == nil) {
cachedObjectsForEntity = [self cacheObjectsForEntity:entity
withMapping:mapping
inContext:managedObjectContext];
[self cacheObjectsForEntity:entity withMapping:mapping inContext:managedObjectContext];
cachedObjectsForEntity = [_entityCache objectForKey:entity.name];
}
return cachedObjectsForEntity;
}
@@ -91,9 +90,9 @@
return object;
}
- (NSMutableDictionary *)cacheObjectsForEntity:(NSEntityDescription *)entity
withMapping:(RKManagedObjectMapping *)mapping
inContext:(NSManagedObjectContext *)managedObjectContext {
- (void)cacheObjectsForEntity:(NSEntityDescription *)entity
withMapping:(RKManagedObjectMapping *)mapping
inContext:(NSManagedObjectContext *)managedObjectContext {
NSAssert(entity, @"Cannot cache objects without an entity");
NSAssert(mapping, @"Cannot cache objects without a mapping");
NSAssert(managedObjectContext, @"Cannot cache objects without a managedObjectContext");
@@ -125,8 +124,6 @@
selector:@selector(objectsDidChange:)
name:NSManagedObjectContextObjectsDidChangeNotification
object:managedObjectContext];
return dictionary;
}
- (void)cacheObject:(NSManagedObject *)managedObject withMapping:(RKManagedObjectMapping *)mapping inContext:(NSManagedObjectContext *)managedObjectContext {