tender-cli
Version:
Command line interface for Tender
41 lines (31 loc) • 1.39 kB
JavaScript
// Generated by CoffeeScript 1.6.2
var BasicReporter, Reporter, _ref,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Reporter = require('../../reporter');
BasicReporter = (function(_super) {
__extends(BasicReporter, _super);
function BasicReporter() {
this.format = __bind(this.format, this); _ref = BasicReporter.__super__.constructor.apply(this, arguments);
return _ref;
}
BasicReporter.prototype.format = function(callback) {
var i, index, _i, _len, _ref1;
if (!this.data) {
return callback();
}
this.output = "\n(" + this.data.length + ") discussions: \n\n";
_ref1 = this.data;
for (index = _i = 0, _len = _ref1.length; _i < _len; index = ++_i) {
i = _ref1[index];
this.output += "#" + i.id + ": " + i.title + "\n";
}
return callback();
};
return BasicReporter;
})(Reporter);
module.exports = function(options, callback) {
return new BasicReporter(options, callback);
};
module.exports.description = "Simple id/title plain text list";