NSString+RACKeyPathUtilities.h 989 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // NSString+RACKeyPathUtilities.h
  3. // ReactiveObjC
  4. //
  5. // Created by Uri Baghin on 05/05/2013.
  6. // Copyright (c) 2013 GitHub, Inc. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. // A private category of methods to extract parts of a key path.
  10. @interface NSString (RACKeyPathUtilities)
  11. // Returns an array of the components of the receiver.
  12. //
  13. // Calling this method on a string that isn't a key path is considered undefined
  14. // behavior.
  15. - (NSArray *)rac_keyPathComponents;
  16. // Returns a key path with all the components of the receiver except for the
  17. // last one.
  18. //
  19. // Calling this method on a string that isn't a key path is considered undefined
  20. // behavior.
  21. - (NSString *)rac_keyPathByDeletingLastKeyPathComponent;
  22. // Returns a key path with all the components of the receiver expect for the
  23. // first one.
  24. //
  25. // Calling this method on a string that isn't a key path is considered undefined
  26. // behavior.
  27. - (NSString *)rac_keyPathByDeletingFirstKeyPathComponent;
  28. @end