Class: Lam::Process::BaseProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/lam/process/base_processor.rb

Direct Known Subclasses

ControllerProcessor

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contextObject (readonly)

Returns the value of attribute context.



16
17
18
# File 'lib/lam/process/base_processor.rb', line 16

def context
  @context
end

#eventObject (readonly)

Returns the value of attribute event.



16
17
18
# File 'lib/lam/process/base_processor.rb', line 16

def event
  @event
end

#handlerObject (readonly)

Returns the value of attribute handler.



16
17
18
# File 'lib/lam/process/base_processor.rb', line 16

def handler
  @handler
end