38 lines
715 B
Objective-C
38 lines
715 B
Objective-C
//
|
|
// Lesson+Conjugator.m
|
|
// Espagram
|
|
//
|
|
// Created by Abel Fokkinga on 11/14/12.
|
|
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
|
|
//
|
|
|
|
#import "Lesson+Conjugator.h"
|
|
#import "SpanishConjugator.h"
|
|
|
|
@implementation Lesson (Conjugator)
|
|
|
|
|
|
- (id <Conjugator>) getConjugationEngine
|
|
{
|
|
if ( [self.conjugator isEqualToString:@"Spanish"] )
|
|
return [[SpanishConjugator alloc] init];
|
|
else
|
|
return nil;
|
|
}
|
|
|
|
- (Tense *) getTenseAsTense
|
|
{
|
|
Tense * tense = [[Tense alloc] init];
|
|
tense.tense = self.tense;
|
|
return tense;
|
|
}
|
|
|
|
- (NSString *) getTenseName
|
|
{
|
|
Tense * tense = [[Tense alloc] init];
|
|
tense.tense = self.tense;
|
|
return [tense getTenseInLanguage:self.conjugator];
|
|
}
|
|
|
|
@end
|