Class: Hanami::Lambda::Function Private
- Inherits:
-
Object
- Object
- Hanami::Lambda::Function
- Defined in:
- lib/hanami/lambda/function.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
The base class for handler
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.inherited(subclass) ⇒ Object
private
Override the Ruby’s hook for modules.
Instance Method Summary collapse
- #call(event:, context:) ⇒ Object private
Class Method Details
.inherited(subclass) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Override the Ruby’s hook for modules
15 16 17 18 19 20 21 22 23 |
# File 'lib/hanami/lambda/function.rb', line 15 def self.inherited(subclass) super subclass.extend ClassMethods if instance_variable_defined?(:@event_type) subclass.instance_variable_set(:@event_type, @event_type) end end |
Instance Method Details
#call(event:, context:) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
48 49 50 51 |
# File 'lib/hanami/lambda/function.rb', line 48 def call(event:, context:) event = self.class.event_type.new(event) handle(event, context) end |