Sha256: 7c2a90946233701760f49399982fd1b603305992e09e5edc91c6561d460bce2f

Contents?: true

Size: 762 Bytes

Versions: 19

Compression:

Stored size: 762 Bytes

Contents

module Jets::Lambda
  class Function < Functions
    # 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")
    def initialize
    end

    def self.handler
      handler_definition.meth
    end

    def self.handler_definition
      definitions.first
    end

    # Used by main_processor.rb.  Same interface as controllers and jobs.
    def self.process(event, context, meth)
      function = new
      function.send(handler, event, context)
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
jets-6.0.5 lib/jets/lambda/function.rb
jets-6.0.4 lib/jets/lambda/function.rb
jets-6.0.3 lib/jets/lambda/function.rb
jets-6.0.2 lib/jets/lambda/function.rb
jets-5.0.13 lib/jets/lambda/function.rb
jets-5.0.12 lib/jets/lambda/function.rb
jets-5.0.11 lib/jets/lambda/function.rb
jets-5.0.10 lib/jets/lambda/function.rb
jets-5.0.9 lib/jets/lambda/function.rb
jets-5.0.8 lib/jets/lambda/function.rb
jets-5.0.7 lib/jets/lambda/function.rb
jets-5.0.6 lib/jets/lambda/function.rb
jets-5.0.5 lib/jets/lambda/function.rb
jets-5.0.4 lib/jets/lambda/function.rb
jets-5.0.3 lib/jets/lambda/function.rb
jets-5.0.2 lib/jets/lambda/function.rb
jets-5.0.1 lib/jets/lambda/function.rb
jets-5.0.0 lib/jets/lambda/function.rb
jets-5.0.0.beta1 lib/jets/lambda/function.rb