Skip to content

Commit

Permalink
Fix #28: Add macro for default string-to-number formatter.
Browse files Browse the repository at this point in the history
  • Loading branch information
designatednerd committed Oct 25, 2015
1 parent 81df7da commit 0d3d292
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Pod/Classes/VOKManagedObjectMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
# define VOK_MAP_FOREIGN_TO_LOCAL(inputKeyPath, coreDataSelectorSymbol) [VOKManagedObjectMap mapWithForeignKeyPath:inputKeyPath coreDataKey:VOK_CDSELECTOR(coreDataSelectorSymbol)]
#endif

/**
* Creates a map for a string to a number using a default NSNumberFormatter.
*
* @param inputKeyPath The foreign key to match with the local key.
* @param coreDataSelectorSymbol The local selector symbol
*/
#ifndef VOK_MAP_FOREIGN_STRING_TO_LOCAL_NUMBER
# define VOK_MAP_FOREIGN_STRING_TO_LOCAL_NUMBER(inputKeyPath, coreDataSelectorSymbol) [VOKManagedObjectMap mapWithForeignKeyPath:inputKeyPath coreDataKey:VOK_CDSELECTOR(coreDataSelectorSymbol) numberFormatter:[NSNumberFormatter new]]
#endif

@interface VOKManagedObjectMap : NSObject

/// Remote key for input/output
Expand Down

0 comments on commit 0d3d292

Please sign in to comment.