forked from kiwi-bdd/Kiwi
/
KWRegisterMatchersNode.m
51 lines (37 loc) · 1.11 KB
/
KWRegisterMatchersNode.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
43
44
45
46
47
48
49
50
51
//
// Licensed under the terms in License.txt
//
// Copyright 2010 Allen Ding. All rights reserved.
//
#import "KWRegisterMatchersNode.h"
#import "KWExampleNodeVisitor.h"
@implementation KWRegisterMatchersNode
#pragma mark -
#pragma mark Initializing
- (id)initWithCallSite:(KWCallSite *)aCallSite namespacePrefix:(NSString *)aNamespacePrefix {
if ((self = [super init])) {
callSite = [aCallSite retain];
namespacePrefix = [aNamespacePrefix copy];
}
return self;
}
+ (id)registerMatchersNodeWithCallSite:(KWCallSite *)aCallSite namespacePrefix:(NSString *)aNamespacePrefix {
return [[[self alloc] initWithCallSite:aCallSite namespacePrefix:aNamespacePrefix] autorelease];
}
- (void)dealloc {
[callSite release];
[namespacePrefix release];
[super dealloc];
}
#pragma mark -
#pragma mark Getting Call Sites
@synthesize callSite;
#pragma mark -
#pragma mark Getting Namespace Prefixes
@synthesize namespacePrefix;
#pragma mark -
#pragma mark Accepting Visitors
- (void)acceptExampleNodeVisitor:(id<KWExampleNodeVisitor>)aVisitor {
[aVisitor visitRegisterMatchersNode:self];
}
@end