Skip to content

Commit 57bb2ee

Browse files
committed
Change requestMethod to method
1 parent d9bdaf3 commit 57bb2ee

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

Code/Network/RKObjectManager.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
Class searchClass = [object class];
7575
do {
7676
for (RKRequestDescriptor *requestDescriptor in requestDescriptors) {
77-
if ([requestDescriptor matchesObject:object requestMethod:requestMethod exactMatch:YES]) return requestDescriptor;
77+
if ([requestDescriptor matchesObject:object method:requestMethod exactMatch:YES]) return requestDescriptor;
7878
}
7979
} while ((searchClass = [searchClass superclass]));
8080
return nil;

Code/Network/RKRequestDescriptor.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
+ (instancetype)requestDescriptorWithMapping:(RKMapping *)mapping
5555
objectClass:(Class)objectClass
5656
rootKeyPath:(NSString *)rootKeyPath
57-
requestMethod:(RKRequestMethod)requestMethod;
57+
method:(RKRequestMethod)method;
5858

5959
///-----------------------------------------------------
6060
/// @name Getting Information About a Request Descriptor
@@ -75,7 +75,7 @@
7575
*/
7676
@property (nonatomic, copy, readonly) NSString *rootKeyPath;
7777

78-
@property (nonatomic, assign, readonly) RKRequestMethod requestMethod;
78+
@property (nonatomic, assign, readonly) RKRequestMethod method;
7979

8080
///--------------------------------
8181
/// @name Using Request Descriptors
@@ -87,6 +87,6 @@
8787
@param object The object to be matched against the receiver.
8888
@return `YES` if the given object matches objectClass, else `NO`.
8989
*/
90-
- (BOOL)matchesObject:(id)object requestMethod:(RKRequestMethod)requestMethod exactMatch:(BOOL)exact;
90+
- (BOOL)matchesObject:(id)object method:(RKRequestMethod)method exactMatch:(BOOL)exact;
9191

9292
@end

Code/Network/RKRequestDescriptor.m

+6-6
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@ @interface RKRequestDescriptor ()
4747
@property (nonatomic, strong, readwrite) RKMapping *mapping;
4848
@property (nonatomic, strong, readwrite) Class objectClass;
4949
@property (nonatomic, copy, readwrite) NSString *rootKeyPath;
50-
@property (nonatomic, assign, readwrite) RKRequestMethod requestMethod;
50+
@property (nonatomic, assign, readwrite) RKRequestMethod method;
5151

5252
@end
5353

5454
@implementation RKRequestDescriptor
5555

5656
+ (instancetype)requestDescriptorWithMapping:(RKMapping *)mapping objectClass:(Class)objectClass rootKeyPath:(NSString *)rootKeyPath
5757
{
58-
return [self requestDescriptorWithMapping:mapping objectClass:objectClass rootKeyPath:rootKeyPath requestMethod:RKRequestMethodAny];
58+
return [self requestDescriptorWithMapping:mapping objectClass:objectClass rootKeyPath:rootKeyPath method:RKRequestMethodAny];
5959
}
6060

61-
+ (instancetype)requestDescriptorWithMapping:(RKMapping *)mapping objectClass:(Class)objectClass rootKeyPath:(NSString *)rootKeyPath requestMethod:(RKRequestMethod)requestMethod
61+
+ (instancetype)requestDescriptorWithMapping:(RKMapping *)mapping objectClass:(Class)objectClass rootKeyPath:(NSString *)rootKeyPath method:(RKRequestMethod)method
6262
{
6363
NSParameterAssert(mapping);
6464
NSParameterAssert(objectClass);
@@ -68,7 +68,7 @@ + (instancetype)requestDescriptorWithMapping:(RKMapping *)mapping objectClass:(C
6868
requestDescriptor.mapping = mapping;
6969
requestDescriptor.objectClass = objectClass;
7070
requestDescriptor.rootKeyPath = rootKeyPath;
71-
requestDescriptor.requestMethod = requestMethod;
71+
requestDescriptor.method = method;
7272
return requestDescriptor;
7373
}
7474

@@ -78,9 +78,9 @@ - (NSString *)description
7878
NSStringFromClass([self class]), self, NSStringFromClass(self.objectClass), self.rootKeyPath, self.mapping];
7979
}
8080

81-
- (BOOL)matchesObject:(id)object requestMethod:(RKRequestMethod)requestMethod exactMatch:(BOOL)exact
81+
- (BOOL)matchesObject:(id)object method:(RKRequestMethod)method exactMatch:(BOOL)exact
8282
{
83-
return (exact ? [object class] == self.objectClass : [object isKindOfClass:self.objectClass] ) && (requestMethod & self.requestMethod) != 0;
83+
return (exact ? [object class] == self.objectClass : [object isKindOfClass:self.objectClass] ) && (method & self.method) != 0;
8484
}
8585

8686
@end

0 commit comments

Comments
 (0)