18 lines
327 B
CoffeeScript
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
|