1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2024-11-05 09:56:22 +00:00
This commit is contained in:
devlinjd 2015-09-10 09:13:12 -04:00
parent aa58edd853
commit c54137a493

View File

@ -1,21 +1,26 @@
/**
Abstract character/resume sheet representation.
@license Copyright (c) 2015 by James M. Devlin. All rights reserved.
*/
(function() { (function() {
var FS = require('fs'); var FS = require('fs');
function Sheet() {
function Sheet() {
this.id = null; this.id = null;
this.title = ""; this.title = "New";
this.sheets = [];
this.rep = { }; this.rep = { };
this.fileName = null;
}
} Sheet.prototype.open = function( file, title ) {
Sheet.prototype.open = function( file ) {
this.rep = JSON.parse( FS.readFileSync( file, 'utf8' ) ); this.rep = JSON.parse( FS.readFileSync( file, 'utf8' ) );
this.fileName = file;
this.title = title || this.rep.basics.name;
return this; return this;
}; };
module.exports = Sheet; module.exports = Sheet;
}()); }());