Class: Zenaton::Interfaces::Workflow Abstract
- Defined in:
- lib/zenaton/interfaces/workflow.rb
Overview
This class is abstract.
Subclass and override #handle to implement a custom Workflow
Direct Known Subclasses
Instance Method Summary collapse
-
#context ⇒ Zenaton::Contexts::Workflow
The workflow execution context.
-
#handle ⇒ Object
Method called to run the workflow.
-
#id ⇒ String, ...
(Optional) Implement this method if you want to use custom IDs for your workflows.
Instance Method Details
#context ⇒ Zenaton::Contexts::Workflow
Returns the workflow execution context.
24 25 26 |
# File 'lib/zenaton/interfaces/workflow.rb', line 24 def context @context || Contexts::Workflow.new end |
#handle ⇒ Object
Method called to run the workflow
11 12 13 14 |
# File 'lib/zenaton/interfaces/workflow.rb', line 11 def handle raise NotImplemented, "Your workflow does not implement the `handle' method" end |
#id ⇒ String, ...
(Optional) Implement this method if you want to use custom IDs for your workflows.
19 20 21 |
# File 'lib/zenaton/interfaces/workflow.rb', line 19 def id nil end |