Files
RestKit/Code/ObjectMapping/RKRequestDescriptor.m
Jawwad Ahmad 8cbdb5f7ed Trailing whitespace cleanup from files in the Code directory.
Used the following command from within the Code dir:
git ls-files *.m *.h *.json | xargs /usr/bin/sed -i '' -E 's/[[:space:]]*$//'
2012-09-02 12:51:45 -04:00

40 lines
1.1 KiB
Objective-C

//
// RKRequestDescriptor.m
// RestKit
//
// Created by Blake Watters on 8/24/12.
// Copyright (c) 2012 RestKit. All rights reserved.
//
#import "RKRequestDescriptor.h"
@interface RKRequestDescriptor ()
@property (nonatomic, strong, readwrite) RKMapping *mapping;
@property (nonatomic, strong, readwrite) Class objectClass;
@property (nonatomic, copy, readwrite) NSString *rootKeyPath;
@end
@implementation RKRequestDescriptor
+ (id)requestDescriptorWithMapping:(RKMapping *)mapping objectClass:(Class)objectClass rootKeyPath:(NSString *)rootKeyPath
{
NSParameterAssert(mapping);
NSParameterAssert(objectClass);
RKRequestDescriptor *requestDescriptor = [self new];
requestDescriptor.mapping = mapping;
requestDescriptor.objectClass = objectClass;
requestDescriptor.rootKeyPath = rootKeyPath;
return requestDescriptor;
}
- (NSString *)description
{
return [NSString stringWithFormat:@"<%@: %p objectClass=%@ rootKeyPath=%@ : %@>",
NSStringFromClass([self class]), self, NSStringFromClass(self.objectClass), self.rootKeyPath, self.mapping];
}
@end