Class: Jets::PolyFun::LambdaExecutor
- Inherits:
-
Object
- Object
- Jets::PolyFun::LambdaExecutor
- Defined in:
- lib/jets/poly_fun/lambda_executor.rb
Instance Method Summary collapse
-
#initialize(task) ⇒ LambdaExecutor
constructor
A new instance of LambdaExecutor.
- #run(event, context) ⇒ Object
Constructor Details
#initialize(task) ⇒ LambdaExecutor
Returns a new instance of LambdaExecutor.
5 6 7 |
# File 'lib/jets/poly_fun/lambda_executor.rb', line 5 def initialize(task) @task = task end |
Instance Method Details
#run(event, context) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/jets/poly_fun/lambda_executor.rb', line 9 def run(event, context) executor_class = "Jets::PolyFun::#{@task.lang.capitalize}Executor".constantize executor = executor_class.new(@task) text = executor.run(event, context) JSON.load(text) end |