Permalink
Browse files

added convenience methods to get Surikae instance

  • Loading branch information...
1 parent 365e0c2 commit 2ff55784e6563c75bc69e291a331e18d783810d8 @katsuyoshi committed Mar 8, 2012
Showing with 18 additions and 0 deletions.
  1. +4 −0 surikae/IUTSurikae.h
  2. +14 −0 surikae/IUTSurikae.m
View
@@ -50,6 +50,10 @@ OF SUCH DAMAGE.
+ (void)surikaeInstanceMethod:(SEL)selector surikae:(void *)surikaeBlock context:(void (^)(void))contextBlock;
- (void)surikaeWithSelector:(SEL)selector surikae:(void *)surikaeBlock context:(void (^)(void))contextBlock;
++ (IUTSurikae *)surikaeWithSelector:(SEL)selector surikae:(void *)surikaeBlock;
++ (IUTSurikae *)surikaeInstanceMethod:(SEL)selector surikae:(void *)surikaeBlock;
+
+
+ (void)registedSurikaeWithSelector:(SEL)selector surikae:(void *)surikaeBlock;
+ (void)registedSurikaeInstanceMethod:(SEL)selector surikae:(void *)surikaeBlock;
- (void)registedSurikaeWithSelector:(SEL)selector surikae:(void *)surikaeBlock;
View
@@ -205,6 +205,20 @@ - (void)surikaeWithSelector:(SEL)selector surikae:(void *)surikaeBlock context:(
[[self class] surikaeInstanceMethod:selector surikae:surikaeBlock context:contextBlock];
}
+
++ (IUTSurikae *)surikaeWithSelector:(SEL)selector surikae:(void *)surikaeBlock
+{
+ return [[[IUTSurikae alloc] initWithClassMethod:selector class:self block:surikaeBlock] autorelease];
+}
+
++ (IUTSurikae *)surikaeInstanceMethod:(SEL)selector surikae:(void *)surikaeBlock
+{
+ return [[[IUTSurikae alloc] initWithInstanceMethod:selector class:self block:surikaeBlock] autorelease];
+}
+
+
+
+
+ (void)registedSurikaeWithSelector:(SEL)selector surikae:(void *)surikaeBlock
{
IUTSurikae *surikae = [[IUTSurikae alloc] initWithClassMethod:selector class:self block:surikaeBlock];

0 comments on commit 2ff5578

Please sign in to comment.