flowerbox/lib/assets/javascripts/flowerbox/result.js.coffee
2012-03-13 13:21:32 -04:00

18 lines
327 B
CoffeeScript

Flowerbox ||= {}
class Flowerbox.Result
@SUCCESS = 'success'
@PENDING = 'pending'
@UNDEFINED = 'undefined'
@FAILURE = 'failure'
@SKIPPED = 'skipped'
constructor: (data) ->
for key, value of data
this[key] = value
this.status ||= Flowerbox.Result.SKIPPED
this.failures ||= []
toJSON: => this