-
Notifications
You must be signed in to change notification settings - Fork 8
/
BFBriefcast.m
51 lines (42 loc) · 1.01 KB
/
BFBriefcast.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
//
// BFBriefcast.m
// Briefs
//
// Created by Rob Rhyne on 9/19/09.
// Copyright Digital Arch Design, 2009. See LICENSE file for details.
//
#import "BFBriefcast.h"
@implementation BFBriefcast
@synthesize url, title, description;
- (id)initWithName:(NSString *)name andURL:(NSString *)address
{
self = [super init];
if (self != nil) {
self.title = name;
self.url = address;
}
return self;
}
- (id)initWithDictionary:(NSDictionary *)dict
{
self = [self initWithName:[dict valueForKey:@"title"] andURL:[dict valueForKey:@"url"]];
if (self != nil) {
self.description = [dict valueForKey:@"description"];
}
return self;
}
- (NSDictionary *)dictionary
{
return [NSDictionary dictionaryWithObjectsAndKeys:
self.title, @"title",
self.url, @"url",
self.description, @"description", nil];
}
- (void)dealloc
{
[title release];
[url release];
[description release];
[super dealloc];
}
@end