ConveyorBelt
The Conveyor Belt is used to move values in and out of models. You can apply any list of transformers to a conveyor-belt. The belt object is passed into the transformer methods.
Methods
next(value)
- Transform the value and pass it alongreject(error)
- Stop the transformation pipeline and throw aConveyorBeltException
skip()
- Don't transform the value.later()
- Returns aConveyorPromise
. If your transformation is on an object value, you can use this callback to allow other transformers to work while you're waiting for an async action. Be careful that your transformer is something that doesn't break with other transformers.runtime()
- Milliseconds script has been running.injectTransformer(String|ConveyorTransformer)
- Transformer to run immediately after this one completes.appendTransformer(String|ConveyorTransformer)
- Transformer to run after all current ones complete.
Properties
start_time
- Unix timestamp of script start.complete
- Booleantransformers
- Array of transformers to run.