测试已测试 | ✓ |
Lang语言 | Obj-CObjective C |
许可证 | MIT |
发布最后发布 | 2015年3月 |
由Elvis Nuñez维护。
#import "NSString+HYPRelationshipParser.h"
#import "HYPParsedRelationship.h"
- (HYPParsedRelationship *)hyp_parseRelationship;
HYPParsedRelationship *parsedRelationship = [@"name" hyp_parseRelationship];
/*
parsedRelationship.attribute => @"name"
*/
HYPParsedRelationship *parsedRelationship = [@"company.name" hyp_parseRelationship];
/*
parsedRelationship.relationship => @"company",
parsedRelationship.to_many => NO,
parsedRelationship.attribute => "name"
*/
HYPParsedRelationship *parsedRelationship = [@"employees[0].email" hyp_parseRelationship];
/*
parsedRelationship.relationship => @"employees",
parsedRelationship.index => 0,
parsedRelationship.to_many => YES,
parsedRelationship.attribute => @"email"
*/
NSString-HYPRelationshipParser通过CocoaPods提供。要安装它,只需在Podfile中添加以下行
pod 'NSString-HYPRelationshipParser'
Hyper Interaktiv AS,[email protected]
NSString-HYPRelationshipParser可在MIT许可证下使用。有关更多信息,请参阅LICENSE文件。