# Code coverage report for model/kanji.ts

# All files / model kanji.ts

57.89% Statements 11/19
100% Branches 0/0
27.27% Functions 3/11
57.89% Lines 11/19

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    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
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88

    8x
    8x
    8x
    8x
    8x
    8x
    8x
    8x
    8x

    2x

    2x

     export class Kanji {
        private _character: string;
        private _meaning: string;
        private _image: string;
        private _animation: string;
        private _strokes: number;
        private _onyomi: string;
        private _kunyomi: string;
        private _radical: {
            character: string,
            position: string
        }
        private _examples: {
            japanese: string,
            english: string
        }[]

        constructor(character: string, meaning: string, image: string,
                    animation: string, strokes: number, onyomi: string,
                    kunyomi: string,
                    radical: { character: string, position: string },
                    examples: { japanese: string, english: string }[]
        ) {
            this._character = character;
            this._meaning = meaning;
            this._image = image;
            this._animation = animation;
            this._strokes = strokes;
            this._onyomi = onyomi;
            this._kunyomi = kunyomi;
            this._radical = radical;
            this._examples = examples;
        }

        get character(): string {
            return this._character;
        }

        get meaning(): string {
            return this._meaning;
        }

        get image(): string {
            return this._image;
        }

        get animation(): string {
            return this._animation;
        }

        get strokes(): number {
            return this._strokes;
        }

        get onyomi(): string {
            return this._onyomi;
        }

        get kunyomi(): string {
            return this._kunyomi;
        }

        get radical(): { character: string, position: string } {
            return this._radical;
        }

        get examples(): { japanese: string, english: string }[] {
            return this._examples;
        }

        toObject() {
            return {
                character: this._character,
                meaning: this._meaning,
                image: this._image,
                animation: this._animation,
                strokes: this._strokes,
                onyomi: this._onyomi,
                kunyomi: this.kunyomi,
                radical: this._radical,
                examples: this._examples
            };
        }

    }