Skip to content

Commit

Permalink
Merge pull request atomicobject#52 from literator/master
Browse files Browse the repository at this point in the history
Added initializer macro using selector.
  • Loading branch information
jdewind committed Oct 4, 2013
2 parents 104e7f9 + 1eef21e commit 3bc1751
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Source/Objection.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,10 @@
NSArray *defaultArguments = [NSArray arrayWithObjects: objs count:sizeof(objs)/sizeof(id)]; \
return JSObjectionUtils.buildInitializer(@selector(selectorSymbol), defaultArguments); \
}


#define objection_initializer_sel(selectorSymbol, args...) \
+ (NSDictionary *)objectionInitializer { \
id objs[] = {args}; \
NSArray *defaultArguments = [NSArray arrayWithObjects: objs count:sizeof(objs)/sizeof(id)]; \
return JSObjectionUtils.buildInitializer(selectorSymbol, defaultArguments); \
}

0 comments on commit 3bc1751

Please sign in to comment.