Class: AWS::Flow::WorkflowFuture

Inherits:
Object
  • Object
show all
Defined in:
lib/aws/decider/workflow_client.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(workflow_execution) ⇒ WorkflowFuture

Creates a new workflow future

Parameters:

  • workflow_execution


37
38
39
40
# File 'lib/aws/decider/workflow_client.rb', line 37

def initialize(workflow_execution)
  @_workflow_execution = workflow_execution
  @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



42
43
44
# File 'lib/aws/decider/workflow_client.rb', line 42

def method_missing(method_name, *args, &block)
  @return_value.send(method_name, *args, &block)
end

Instance Attribute Details

#_workflow_executionObject

The [WorkflowExecution](docs.aws.amazon.com/AWSRubySDK/latest/AWS/SimpleWorkflow/WorkflowExecution.html) instance that this future belongs to.



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/aws/decider/workflow_client.rb', line 29

class WorkflowFuture
  attr_accessor :_workflow_execution, :return_value


  # Creates a new workflow future
  #
  # @param workflow_execution
  #
  def initialize(workflow_execution)
    @_workflow_execution = workflow_execution
    @return_value = Future.new
  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_valueObject

The return value of the future.



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/aws/decider/workflow_client.rb', line 29

class WorkflowFuture
  attr_accessor :_workflow_execution, :return_value


  # Creates a new workflow future
  #
  # @param workflow_execution
  #
  def initialize(workflow_execution)
    @_workflow_execution = workflow_execution
    @return_value = Future.new
  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

#workflow_executionObject

Gets the current value of the workflow execution

Returns:



49
50
51
# File 'lib/aws/decider/workflow_client.rb', line 49

def workflow_execution
  @_workflow_execution
end