Sha256: 245224f06f6f32a478c9587bc6651bafbfe8e473efce4fed3294dbfd1056cd01

Contents?: true

Size: 945 Bytes

Versions: 126

Compression:

Stored size: 945 Bytes

Contents

require 'json'

# Jets::Lambda::Functions represents a collection of Lambda functions.
#
# Jets::Lambda::Functions is the superclass of:
#   Jets::Controller::Base
#   Jets::Job::Base
module Jets::Lambda
  class Functions
    attr_reader :event, :context, :meth
    def initialize(event, context, meth)
      @event = event # Hash, JSON.parse(event) ran BaseProcessor
      @context = context # Hash. JSON.parse(context) ran in BaseProcessor
      @meth = meth
      # store meth because it is useful to for identifying the which template
      # to use later.
    end

    include Dsl # At the end so methods like event, context and method
      # do not trigger method_added

    class << self
      # Tracking subclasses because it helps with Lambda::Dsl#find_all_tasks
      def subclasses
        @subclasses ||= []
      end

      def inherited(base)
        super
        self.subclasses << base if base.name
      end
    end
  end
end

Version data entries

126 entries across 126 versions & 3 rubygems

Version Path
jets-1.9.3 lib/jets/lambda/functions.rb
jets-1.9.2 lib/jets/lambda/functions.rb
jets-1.9.1 lib/jets/lambda/functions.rb
jets-1.9.0 lib/jets/lambda/functions.rb
jets-1.8.14 lib/jets/lambda/functions.rb
jets-1.8.13 lib/jets/lambda/functions.rb
jets-1.8.12 lib/jets/lambda/functions.rb
jets-1.8.11 lib/jets/lambda/functions.rb
jets-1.8.10 lib/jets/lambda/functions.rb
jets-1.8.9 lib/jets/lambda/functions.rb
jets-1.8.8 lib/jets/lambda/functions.rb
jets-1.8.7 lib/jets/lambda/functions.rb
jets-1.8.6 lib/jets/lambda/functions.rb
jets-1.8.5 lib/jets/lambda/functions.rb
jets-1.8.4 lib/jets/lambda/functions.rb
jets-1.8.3 lib/jets/lambda/functions.rb
jets-1.8.2 lib/jets/lambda/functions.rb
jets-1.8.1 lib/jets/lambda/functions.rb
jets-1.8.0 lib/jets/lambda/functions.rb
jets-1.7.2 lib/jets/lambda/functions.rb