mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-01-12 17:43:34 +08:00
Element+OTRestAdditions copied in, not relative.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,5 +1,5 @@
|
||||
# the build
|
||||
build/*
|
||||
build
|
||||
|
||||
# temp nibs and swap files
|
||||
*~.nib
|
||||
|
||||
18
Element+OTRestAdditions.h
Normal file
18
Element+OTRestAdditions.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Element+OTRestAdditions.h
|
||||
// gateguru
|
||||
//
|
||||
// Created by Blake Watters on 8/6/09.
|
||||
// Copyright 2009 Objective 3. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "Element.h"
|
||||
|
||||
@interface Element (OTRestAdditions)
|
||||
|
||||
- (NSString*)contentsTextOfChildElement:(NSString*)selector;
|
||||
- (NSNumber*)contentsNumber;
|
||||
- (NSNumber*)contentsNumberOfChildElement:(NSString*)selector;
|
||||
|
||||
@end
|
||||
26
Element+OTRestAdditions.m
Normal file
26
Element+OTRestAdditions.m
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// Element+OTRestAdditions.m
|
||||
// gateguru
|
||||
//
|
||||
// Created by Blake Watters on 8/6/09.
|
||||
// Copyright 2009 Objective 3. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Element+OTRestAdditions.h"
|
||||
|
||||
|
||||
@implementation Element (OTRestAdditions)
|
||||
|
||||
- (NSString*)contentsTextOfChildElement:(NSString*)selector {
|
||||
return [[self selectElement:selector] contentsText];
|
||||
}
|
||||
|
||||
- (NSNumber*)contentsNumber {
|
||||
return [NSNumber numberWithInt:[[self contentsText] intValue]];
|
||||
}
|
||||
|
||||
- (NSNumber*)contentsNumberOfChildElement:(NSString*)selector {
|
||||
return [[self selectElement:selector] contentsNumber];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -41,8 +41,8 @@
|
||||
3F4E1944102DD4B300320118 /* TagChunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F4E1933102DD4B300320118 /* TagChunk.h */; };
|
||||
3F4E1945102DD4B300320118 /* TxtChunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F4E1934102DD4B300320118 /* TxtChunk.h */; };
|
||||
3F4E1946102DD4B300320118 /* URLParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F4E1935102DD4B300320118 /* URLParser.h */; };
|
||||
3F4E194A102DD4C900320118 /* Element+OTRestAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F4E1948102DD4C900320118 /* Element+OTRestAdditions.h */; };
|
||||
3F4E194B102DD4C900320118 /* Element+OTRestAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3F4E1949102DD4C900320118 /* Element+OTRestAdditions.m */; };
|
||||
3F4E1976102DD8CA00320118 /* Element+OTRestAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F4E1974102DD8CA00320118 /* Element+OTRestAdditions.h */; };
|
||||
3F4E1977102DD8CA00320118 /* Element+OTRestAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3F4E1975102DD8CA00320118 /* Element+OTRestAdditions.m */; };
|
||||
AA747D9F0F9514B9006C5449 /* OTRestFramework_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* OTRestFramework_Prefix.pch */; };
|
||||
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
@@ -100,8 +100,8 @@
|
||||
3F4E1933102DD4B300320118 /* TagChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TagChunk.h; path = ../ElementParser/Classes/TagChunk.h; sourceTree = SOURCE_ROOT; };
|
||||
3F4E1934102DD4B300320118 /* TxtChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TxtChunk.h; path = ../ElementParser/Classes/TxtChunk.h; sourceTree = SOURCE_ROOT; };
|
||||
3F4E1935102DD4B300320118 /* URLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = URLParser.h; path = ../ElementParser/Classes/URLParser.h; sourceTree = SOURCE_ROOT; };
|
||||
3F4E1948102DD4C900320118 /* Element+OTRestAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Element+OTRestAdditions.h"; path = "../gateguru-iphone/Element+OTRestAdditions.h"; sourceTree = SOURCE_ROOT; };
|
||||
3F4E1949102DD4C900320118 /* Element+OTRestAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "Element+OTRestAdditions.m"; path = "../gateguru-iphone/Element+OTRestAdditions.m"; sourceTree = SOURCE_ROOT; };
|
||||
3F4E1974102DD8CA00320118 /* Element+OTRestAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Element+OTRestAdditions.h"; sourceTree = "<group>"; };
|
||||
3F4E1975102DD8CA00320118 /* Element+OTRestAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Element+OTRestAdditions.m"; sourceTree = "<group>"; };
|
||||
AA747D9E0F9514B9006C5449 /* OTRestFramework_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OTRestFramework_Prefix.pch; sourceTree = SOURCE_ROOT; };
|
||||
AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
D2AAC07E0554694100DB518D /* libOTRestFramework.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libOTRestFramework.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -152,7 +152,7 @@
|
||||
08FB77AEFE84172EC02AAC07 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3F4E1949102DD4C900320118 /* Element+OTRestAdditions.m */,
|
||||
3F4E1975102DD8CA00320118 /* Element+OTRestAdditions.m */,
|
||||
3F4E1919102DD42F00320118 /* NSDictionary+OTRestRequestSerialization.m */,
|
||||
3F4E18E4102DD38700320118 /* OTRestClient.m */,
|
||||
3F4E18E6102DD38700320118 /* OTRestParams.m */,
|
||||
@@ -208,7 +208,7 @@
|
||||
3F4E1958102DD60000320118 /* OTRestHeaders */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3F4E1948102DD4C900320118 /* Element+OTRestAdditions.h */,
|
||||
3F4E1974102DD8CA00320118 /* Element+OTRestAdditions.h */,
|
||||
3F4E1918102DD42F00320118 /* NSDictionary+OTRestRequestSerialization.h */,
|
||||
3F4E18E3102DD38700320118 /* OTRestClient.h */,
|
||||
3F4E18E5102DD38700320118 /* OTRestParams.h */,
|
||||
@@ -256,7 +256,7 @@
|
||||
3F4E1944102DD4B300320118 /* TagChunk.h in Headers */,
|
||||
3F4E1945102DD4B300320118 /* TxtChunk.h in Headers */,
|
||||
3F4E1946102DD4B300320118 /* URLParser.h in Headers */,
|
||||
3F4E194A102DD4C900320118 /* Element+OTRestAdditions.h in Headers */,
|
||||
3F4E1976102DD8CA00320118 /* Element+OTRestAdditions.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -328,7 +328,7 @@
|
||||
3F4E18FD102DD38800320118 /* OTRestRequest.m in Sources */,
|
||||
3F4E1900102DD38800320118 /* OTRestResponse.m in Sources */,
|
||||
3F4E191B102DD42F00320118 /* NSDictionary+OTRestRequestSerialization.m in Sources */,
|
||||
3F4E194B102DD4C900320118 /* Element+OTRestAdditions.m in Sources */,
|
||||
3F4E1977102DD8CA00320118 /* Element+OTRestAdditions.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user