kaffee
Version:
Kaffee is a software project management tool similar to Maven and is written in Coffeescript. Kaffee allows you to compile, test, minify and many other tasks to make building your application simple and fun again.
112 lines (76 loc) • 2.31 kB
JavaScript
/*
A {@link Result} instance contains the result of a executed {@link Goal}
@author Fabian M. <mail.fabianm@gmail.com>
*/
(function() {
var Result;
Result = (function() {
/*
Constructs a new {@link Result} instance.
@since 0.2.1
@param project The {@link Project} of this {@link Result}.
@param parent The parent {@link Result} of this {@link Result}.
*/
function Result(project) {
this.project = project;
this.childs = [];
this.logs = [];
}
/*
Returns the {@link LogEvent}s of this {@link Result} instance.
@since 0.3.0
@return The {@link LogEvent}s of this {@link Result} instance.
*/
Result.prototype.getLogs = function() {
return this.logs;
};
/*
Returns the {@link Project} of this {@link ProjectResult} instance.
@since 0.2.1
@return The {@link Project} of this {@link ProjectResult} instance.
*/
Result.prototype.getProject = function() {
return this.project;
};
/*
Adds a child {@link Result} to this {@link Result} instance.
@since 0.2.1
@param child The {@link Result} to add.
*/
Result.prototype.addChild = function(child) {
if (!child) {
return this.childs;
}
if (child instanceof Result) {
return this.childs.push(child);
}
return this.childs = this.childs.concat(child);
};
/*
Returns the child {@link Result}s of this {@link Result} instance.
@since 0.2.1
@return The child {@link Result}s of this {@link Result} instance.
*/
Result.prototype.getChilds = function() {
return this.childs;
};
/*
Sets the result message of this {@link Result} instance.
@since 0.2.1
@param message The message to set.
*/
Result.prototype.setMessage = function(message) {
this.message = message;
};
/*
Returns the result message of this {@link Result} instance.
@since 0.2.1
@return The result message of this {@link Result} instance.
*/
Result.prototype.getMessage = function() {
return this.message;
};
return Result;
})();
module.exports = Result;
}).call(this);