Class: Lam::Process::BaseProcessor
- Inherits:
-
Object
- Object
- Lam::Process::BaseProcessor
- Defined in:
- lib/lam/process/base_processor.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#handler ⇒ Object
readonly
Returns the value of attribute handler.
Instance Method Summary collapse
-
#initialize(event, context, handler) ⇒ BaseProcessor
constructor
A new instance of BaseProcessor.
Constructor Details
#initialize(event, context, handler) ⇒ BaseProcessor
Returns a new instance of BaseProcessor.
17 18 19 20 21 22 |
# File 'lib/lam/process/base_processor.rb', line 17 def initialize(event, context, handler) # assume valid json from Lambda @event = JSON.parse(event) @context = JSON.parse(context) @handler = handler end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
16 17 18 |
# File 'lib/lam/process/base_processor.rb', line 16 def context @context end |
#event ⇒ Object (readonly)
Returns the value of attribute event.
16 17 18 |
# File 'lib/lam/process/base_processor.rb', line 16 def event @event end |
#handler ⇒ Object (readonly)
Returns the value of attribute handler.
16 17 18 |
# File 'lib/lam/process/base_processor.rb', line 16 def handler @handler end |