Class: AWS::Flow::WorkflowFuture
- Inherits:
-
Object
- Object
- AWS::Flow::WorkflowFuture
- Defined in:
- lib/aws/decider/workflow_client.rb
Overview
A future provided by a [WorkflowExecution](docs.aws.amazon.com/AWSRubySDK/latest/AWS/SimpleWorkflow/WorkflowExecution.html).
Instance Attribute Summary collapse
-
#_workflow_execution ⇒ Object
A MinimalWorkflowExecution instance that this future belongs to.
-
#return_value ⇒ Object
The return value of the future.
Instance Method Summary collapse
-
#initialize(workflow_execution) ⇒ WorkflowFuture
constructor
Creates a new workflow future.
-
#is_flow_future? ⇒ Boolean
determines whether the object is a flow future.
- #method_missing(method_name, *args, &block) ⇒ Object
-
#workflow_execution ⇒ Object
Gets the current value of the workflow execution.
Constructor Details
#initialize(workflow_execution) ⇒ WorkflowFuture
Creates a new workflow future
50 51 52 53 |
# File 'lib/aws/decider/workflow_client.rb', line 50 def initialize(workflow_execution) @_workflow_execution = workflow_execution.dup @return_value = Future.new end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
61 62 63 |
# File 'lib/aws/decider/workflow_client.rb', line 61 def method_missing(method_name, *args, &block) @return_value.send(method_name, *args, &block) end |
Instance Attribute Details
#_workflow_execution ⇒ Object
A MinimalWorkflowExecution instance that this future belongs to.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/aws/decider/workflow_client.rb', line 42 class WorkflowFuture attr_accessor :_workflow_execution, :return_value # Creates a new workflow future # # @param workflow_execution # def initialize(workflow_execution) @_workflow_execution = workflow_execution.dup @return_value = Future.new end # determines whether the object is a flow future. The contract is that # flow futures must have a #get method. def is_flow_future? true end def method_missing(method_name, *args, &block) @return_value.send(method_name, *args, &block) end # Gets the current value of the workflow execution # @return def workflow_execution @_workflow_execution end end |
#return_value ⇒ Object
The return value of the future.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/aws/decider/workflow_client.rb', line 42 class WorkflowFuture attr_accessor :_workflow_execution, :return_value # Creates a new workflow future # # @param workflow_execution # def initialize(workflow_execution) @_workflow_execution = workflow_execution.dup @return_value = Future.new end # determines whether the object is a flow future. The contract is that # flow futures must have a #get method. def is_flow_future? true end def method_missing(method_name, *args, &block) @return_value.send(method_name, *args, &block) end # Gets the current value of the workflow execution # @return def workflow_execution @_workflow_execution end end |
Instance Method Details
#is_flow_future? ⇒ Boolean
determines whether the object is a flow future. The contract is that flow futures must have a #get method.
57 58 59 |
# File 'lib/aws/decider/workflow_client.rb', line 57 def is_flow_future? true end |
#workflow_execution ⇒ Object
Gets the current value of the workflow execution
68 69 70 |
# File 'lib/aws/decider/workflow_client.rb', line 68 def workflow_execution @_workflow_execution end |