Skip to content

Commit

Permalink
refactoring to adhere to conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
Machx committed Apr 3, 2013
1 parent 2d8dbcc commit 62bd4b3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Source/NSManagedObjectContextAdditions.m
Expand Up @@ -48,18 +48,18 @@ -(void)cw_setDebugName:(NSString *)cwdebugname {
} }


-(void)cw_logObjectsInContext { -(void)cw_logObjectsInContext {
if ([self cw_debugName]) { if (self.cw_debugName) {
NSLog(@"MOC Name: %@",[self cw_debugName]); NSLog(@"MOC Name: %@",[self cw_debugName]);
} else { } else {
NSLog(@"MOC: %@",[self description]); NSLog(@"MOC: %@",[self description]);
} }


NSLog(@"Has Changes: %@",(self.hasChanges ? @"YES" : @"NO")); NSLog(@"Has Changes: %@",(self.hasChanges ? @"YES" : @"NO"));


if ([self hasChanges]) { if (self.hasChanges) {
if ([[self insertedObjects] count] > 0) NSLog(@"%lu Inserted Objects",(long)[[self insertedObjects] count]); if (self.insertedObjects.count > 0) NSLog(@"%lu Inserted Objects",(long)self.insertedObjects.count);
if ([[self updatedObjects] count] > 0) NSLog(@"%lu Updated Objects",(long)[[self updatedObjects] count]); if (self.updatedObjects.count > 0) NSLog(@"%lu Updated Objects",(long)self.updatedObjects.count);
if ([[self deletedObjects] count] > 0) NSLog(@"%lu Deleted Objects",(long)[[self deletedObjects] count]); if (self.deletedObjects.count > 0) NSLog(@"%lu Deleted Objects",(long)self.deletedObjects.count);
} }
} }


Expand Down

0 comments on commit 62bd4b3

Please sign in to comment.