Update designated initializer for RKObjectMapping

This commit is contained in:
Blake Watters
2012-08-29 18:59:51 -04:00
parent 9089bb4ed0
commit eabfd748b6
2 changed files with 5 additions and 4 deletions

View File

@@ -48,9 +48,7 @@ NSString * const RKObjectMappingNestingAttributeKeyName = @"<RK_NESTING_ATTRIBUT
+ (id)mappingForClass:(Class)objectClass
{
RKObjectMapping *mapping = [self new];
mapping.objectClass = objectClass;
return mapping;
return [[self alloc] initWithClass:objectClass];
}
+ (id)requestMapping
@@ -58,10 +56,11 @@ NSString * const RKObjectMappingNestingAttributeKeyName = @"<RK_NESTING_ATTRIBUT
return [self mappingForClass:[NSMutableDictionary class]];
}
- (id)init
- (id)initWithClass:(Class)objectClass
{
self = [super init];
if (self) {
self.objectClass = objectClass;
self.mutablePropertyMappings = [NSMutableArray new];
self.setDefaultValueForMissingAttributes = NO;
self.setNilForMissingRelationships = NO;