Class: Jets::Lambda::Function
- Defined in:
- lib/jets/lambda/function.rb
Instance Attribute Summary
Attributes inherited from Functions
Class Method Summary collapse
- .handler ⇒ Object
- .handler_task ⇒ Object
-
.process(event, context, meth) ⇒ Object
Used by main_processor.rb.
Instance Method Summary collapse
-
#initialize ⇒ Function
constructor
Override and change the signature so we do not have to provide info at initialization.
Methods inherited from Functions
inherited, output_keys, subclasses
Methods included from Dsl
Constructor Details
#initialize ⇒ Function
Override and change the signature so we do not have to provide info at initialization. So:
hello_function = HelloFunction.new
hello_function.lambda_handler(event, context)
Normally controller and job functions initialize like this:
controller = PostController.new(event, context, "handler_handler")
12 13 |
# File 'lib/jets/lambda/function.rb', line 12 def initialize end |
Class Method Details
.handler ⇒ Object
15 16 17 |
# File 'lib/jets/lambda/function.rb', line 15 def self.handler handler_task.meth end |
.handler_task ⇒ Object
19 20 21 |
# File 'lib/jets/lambda/function.rb', line 19 def self.handler_task tasks.first end |
.process(event, context, meth) ⇒ Object
Used by main_processor.rb. Same interface as controllers and jobs.
24 25 26 27 |
# File 'lib/jets/lambda/function.rb', line 24 def self.process(event, context, meth) function = new function.send(handler, event, context) end |