pEpObjCAdapter/PEPLanguage.m
author Dirk Zimmermann <dirk@pep-project.org>
Thu, 15 Mar 2018 08:44:12 +0100
branchIOSAD-49
changeset 540 90495cd2cf62
parent 187 1f630a05e444
permissions -rw-r--r--
Closing unneeded heads, reopen if still needed
dirk@187
     1
//
dirk@187
     2
//  PEPLanguage.m
dirk@187
     3
//  pEpiOSAdapter
dirk@187
     4
//
dirk@187
     5
//  Created by Dirk Zimmermann on 03.05.17.
dirk@187
     6
//  Copyright © 2017 p≡p. All rights reserved.
dirk@187
     7
//
dirk@187
     8
dirk@187
     9
#import "PEPLanguage.h"
dirk@187
    10
dirk@187
    11
@implementation PEPLanguage
dirk@187
    12
dirk@187
    13
- (instancetype _Nonnull)initWithCode:(NSString * _Nonnull)code
dirk@187
    14
                                 name:(NSString * _Nonnull)name
dirk@187
    15
                                 sentence:(NSString * _Nonnull)sentence
dirk@187
    16
{
dirk@187
    17
    if (self = [[PEPLanguage alloc] init]) {
dirk@187
    18
        _code = code;
dirk@187
    19
        _name = name;
dirk@187
    20
        _sentence = sentence;
dirk@187
    21
    }
dirk@187
    22
    return self;
dirk@187
    23
}
dirk@187
    24
dirk@187
    25
- (NSString *)debugDescription
dirk@187
    26
{
dirk@187
    27
    return [NSString stringWithFormat:@"<%@: %p> %@", [self class], self, self.description];
dirk@187
    28
}
dirk@187
    29
dirk@187
    30
- (NSString *)description
dirk@187
    31
{
dirk@187
    32
    return [NSString stringWithFormat:@"%@ %@", self.code, self.name];
dirk@187
    33
}
dirk@187
    34
dirk@187
    35
@end