f62c40fdf49a1571442bd25becb1ffd9f7bd13ac
[enjoyable.git] / Config.m
1 //
2 // Config.m
3 // Enjoy
4 //
5 // Created by Sam McCall on 4/05/09.
6 //
7
8 #import "Config.h"
9
10 @implementation Config
11
12 @synthesize protect, name, entries;
13
14 - (id)init {
15 if ((self = [super init])) {
16 entries = [[NSMutableDictionary alloc] init];
17 }
18 return self;
19 }
20
21 - (void)setTarget:(Target *)target forAction:(JSAction *)jsa {
22 entries[[jsa stringify]] = target;
23 }
24
25 - (Target *)getTargetForAction:(JSAction *)jsa {
26 return entries[[jsa stringify]];
27 }
28
29 @end