Files
gitbook/lib/models/language.js
T
Samy Pessé 4336fdb241 Base
2016-04-22 11:00:21 +02:00

22 lines
422 B
JavaScript

var path = require('path');
var Immutable = require('immutable');
var Language = Immutable.Record({
title: String(),
path: String()
});
Language.prototype.getTitle = function() {
return this.get('title');
};
Language.prototype.getPath = function() {
return this.get('path');
};
Language.prototype.getID = function() {
return path.basename(this.getPath());
};
module.exports = Language;