Class: WorkflowTemplate::Outcome
- Inherits:
-
Object
- Object
- WorkflowTemplate::Outcome
- Extended by:
- Forwardable
- Defined in:
- lib/workflow_template/outcome.rb,
lib/workflow_template/outcome/block.rb,
lib/workflow_template/outcome/status.rb,
lib/workflow_template/outcome/handler.rb,
lib/workflow_template/outcome/statuses.rb
Defined Under Namespace
Classes: Block, Handler, Status, Statuses
Instance Method Summary collapse
- #data ⇒ Object
- #handle(&block) ⇒ Object
-
#initialize(state) ⇒ Outcome
constructor
A new instance of Outcome.
Constructor Details
Instance Method Details
#data ⇒ Object
39 40 41 |
# File 'lib/workflow_template/outcome.rb', line 39 def data final_state. end |
#handle(&block) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/workflow_template/outcome.rb', line 25 def handle(&block) binding = block.binding unless block.source_location.nil? handler_block = Outcome::Block.new(handler, binding) handler_block.instance_eval(&block) self.handler = handler_block.handler ensure_default_handled! freeze handler.retval end |