Class: Simplerubysteps::Callback
Instance Attribute Summary
Attributes inherited from State
Instance Method Summary collapse
- #action(&action_block) ⇒ Object
-
#initialize(name) ⇒ Callback
constructor
A new instance of Callback.
- #perform_action(input, token) ⇒ Object
Methods inherited from State
Constructor Details
#initialize(name) ⇒ Callback
Returns a new instance of Callback.
101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/simplerubysteps.rb', line 101 def initialize(name) super @dict[:Type] = "Task" @dict[:Resource] = "arn:aws:states:::lambda:invoke.waitForTaskToken" @dict[:Parameters] = { :FunctionName => function_name, :Payload => { :Task => name, "Input.$" => "$", "Token.$" => "$$.Task.Token", }, } end |
Instance Method Details
#action(&action_block) ⇒ Object
115 116 117 |
# File 'lib/simplerubysteps.rb', line 115 def action(&action_block) @action_block = action_block end |
#perform_action(input, token) ⇒ Object
119 120 121 |
# File 'lib/simplerubysteps.rb', line 119 def perform_action(input, token) @action_block.call(input, token) if @action_block end |