2015-11-28 21:20:24 +00:00
|
|
|
/// <reference path="./index.ts" />
|
|
|
|
var Check = (function () {
|
|
|
|
function Check(nameArg, resultArg) {
|
|
|
|
this.name = nameArg;
|
|
|
|
this.result = resultArg;
|
|
|
|
}
|
|
|
|
return Check;
|
|
|
|
})();
|
|
|
|
var CheckStorage = (function () {
|
|
|
|
function CheckStorage() {
|
|
|
|
this.checks = [];
|
|
|
|
}
|
|
|
|
CheckStorage.prototype.addCheck = function (name, result) {
|
|
|
|
var localCheck = new Check(name, result);
|
|
|
|
this.checks.push(localCheck);
|
|
|
|
};
|
|
|
|
CheckStorage.prototype.print = function () {
|
2015-11-28 21:34:32 +00:00
|
|
|
var localTable = beautylog.table.new("checks");
|
2015-11-28 21:20:24 +00:00
|
|
|
for (var check in this.checks) {
|
|
|
|
localTable.push([this.checks[check].name, this.checks[check].result]);
|
|
|
|
}
|
2015-11-28 21:34:32 +00:00
|
|
|
localTable.print();
|
2015-11-28 21:20:24 +00:00
|
|
|
};
|
|
|
|
return CheckStorage;
|
|
|
|
})();
|
|
|
|
/// <reference path="typings/tsd.d.ts" />
|
|
|
|
/// <reference path="./classes.ts" />
|
|
|
|
var beautylog = require("beautylog")("os");
|
|
|
|
var smartcheck = {};
|
|
|
|
smartcheck.newStorage = function () {
|
|
|
|
return new CheckStorage;
|
|
|
|
};
|
|
|
|
module.exports = smartcheck;
|