mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-02 22:42:45 +08:00
Add count method to RKMappingResult
This commit is contained in:
@@ -32,5 +32,6 @@
|
||||
- (id)asObject;
|
||||
- (NSArray *)asCollection;
|
||||
- (NSError *)asError;
|
||||
- (NSUInteger)count;
|
||||
|
||||
@end
|
||||
|
||||
@@ -106,4 +106,9 @@
|
||||
return [NSString stringWithFormat:@"<%@: %p, results=%@>", NSStringFromClass([self class]), self, self.keyPathToMappedObjects];
|
||||
}
|
||||
|
||||
- (NSUInteger)count
|
||||
{
|
||||
return [[self asCollection] count];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user