@implementation DDLicense


- (DDLicense *)initWithDictionary:(NSDictionary *)dictionary {
    if (self = [super init])
    {
        self.name           = [dictionary objectForKey:@"name"];
        self.licenseText    = [dictionary objectForKey:@"licenseText"];
        self.isHTML         = [[dictionary objectForKey:@"isHTML"] boolValue];
        self.licenseUrl     = [dictionary objectForKey:@"licenseUrl"];
    }
    return self;
}


+ (NSArray *) licenseArrayFromDictionaryArray: (NSArray*) array {
    NSMutableArray * licenses = [NSMutableArray array];
    for(NSDictionary* dict in array){
        [licenses addObject:[[DDLicense alloc]  initWithDictionary:dict]];
    }
    return [NSArray arrayWithArray:licenses];
}



@end
