forked from tomaz/appledoc
/
MethodGroupInfo.m
42 lines (32 loc) · 1.03 KB
/
MethodGroupInfo.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// MethodGroupInfo.m
// appledoc
//
// Created by Tomaž Kragelj on 4/13/12.
// Copyright (c) 2012 Tomaz Kragelj. All rights reserved.
//
#import "Objects.h"
#import "StoreRegistrations.h"
#import "MethodGroupInfo.h"
@implementation MethodGroupInfo
+ (id)MethodGroupInfoWithName:(NSString *)name {
MethodGroupInfo *result = [[self alloc] init];
result.nameOfMethodGroup = name;
return result;
}
- (NSMutableArray *)methodGroupMethods {
if (_methodGroupMethods) return _methodGroupMethods;
LogIntDebug(@"Initializing methods array due to first access...");
_methodGroupMethods = [[NSMutableArray alloc] init];
return _methodGroupMethods;
}
@end
#pragma mark -
@implementation NSArray (MethodGroupInfoExtensions)
- (BOOL)gb_containsMethodGroupInfoWithName:(NSString *)name {
return [self gb_containsObjectWithValue:name forSelector:@selector(nameOfMethodGroup)];
}
- (NSUInteger)gb_indexOfMethodGroupInfoWithName:(NSString *)name {
return [self gb_indexOfObjectWithValue:name forSelector:@selector(nameOfMethodGroup)];
}
@end