Latest 0.4.1
Homepage https://github.com/hyperoslo/NSString-HYPRelationshipParser
License MIT
Platforms ios 7.0, requires ARC
Frameworks Foundation
Authors

CI Status
Version
License
Platform

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.

Latest podspec

{
    "name": "NSString-HYPRelationshipParser",
    "version": "0.4.1",
    "summary": "Parse string representations of model relationships",
    "homepage": "https://github.com/hyperoslo/NSString-HYPRelationshipParser",
    "license": "MIT",
    "authors": {
        "Hyper Interaktiv AS": "[email protected]"
    },
    "source": {
        "git": "https://github.com/hyperoslo/NSString-HYPRelationshipParser.git",
        "tag": "0.4.1"
    },
    "social_media_url": "https://twitter.com/hyperoslo",
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Source/**/*",
    "frameworks": "Foundation"
}

Pin It on Pinterest

Share This