Passed
Push — develop ( f0c08b...9e3bd7 )
by Endre
03:40
created

Presenter.present   A

Complexity

Conditions 1

Size

Total Lines 7
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 7
dl 0
loc 7
ccs 4
cts 4
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
import {ILanguageSetup} from '../../../Language/ChangeLanguageSetup';
2
import Translator from '../../../Language/Translator';
3
import {IObserver} from '../../../Observer/Observer';
4
import Model from './Model';
5
6
export default class Presenter {
7
  languageSetupObserver: IObserver<ILanguageSetup>;
8
9
  constructor(languageSetupObserver: IObserver<ILanguageSetup>) {
10 3
    this.languageSetupObserver = languageSetupObserver;
11
  }
12
13
  present(): Model {
14 1
    const model: Model = new Model();
15 1
    const translator: Translator = this.languageSetupObserver.value.translator;
16 1
    model.title = translator.translate('Application.TopBar.Title');
17
18 1
    return model;
19
  }
20
}