diff --git a/index.js b/index.js index ff69dc5..a717381 100644 --- a/index.js +++ b/index.js @@ -15,11 +15,11 @@ var CheckStorage = (function () { this.checks.push(localCheck); }; CheckStorage.prototype.print = function () { + var localTable = beautylog.table.new("checks"); for (var check in this.checks) { - var localTable = beautylog.table.new("checks"); localTable.push([this.checks[check].name, this.checks[check].result]); - localTable.print(); } + localTable.print(); }; return CheckStorage; })(); diff --git a/ts/classes.ts b/ts/classes.ts index 5c3ca22..c8416c8 100644 --- a/ts/classes.ts +++ b/ts/classes.ts @@ -18,10 +18,10 @@ class CheckStorage { this.checks.push(localCheck); } print() { + var localTable = beautylog.table.new("checks"); for (var check in this.checks){ - var localTable = beautylog.table.new("checks"); localTable.push([this.checks[check].name,this.checks[check].result]); - localTable.print(); } + localTable.print(); } } \ No newline at end of file