NSString-HYPRelationshipParser 0.4.1

NSString-HYPRelationshipParser 0.4.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Mar 2015

Maintained by Elvis Nuñez.



Usage

#import "NSString+HYPRelationshipParser.h"
#import "HYPParsedRelationship.h"

- (HYPParsedRelationship *)hyp_parseRelationship;

Example

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"
*/

Installation

NSString-HYPRelationshipParser is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'NSString-HYPRelationshipParser'

Author

Hyper Interaktiv AS, [email protected]

License

NSString-HYPRelationshipParser is available under the MIT license. See the LICENSE file for more info.