Sha256: f73b03c5ea4bb7f7a6c201859885e6687a43bf7ec57c5f0c94269b055ef9c2a2

Contents?: true

Size: 1.06 KB

Versions: 75

Compression:

Stored size: 1.06 KB

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 = HashWithIndifferentAccess.new(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

      # Needed for depends_on. Got added due to stagger logic.
      def output_keys
        []
      end
    end
  end
end

Version data entries

75 entries across 75 versions & 2 rubygems

Version Path
jets-4.0.12 lib/jets/lambda/functions.rb
jets-4.0.11 lib/jets/lambda/functions.rb
jets-4.0.10 lib/jets/lambda/functions.rb
jets-4.0.9 lib/jets/lambda/functions.rb
jets-4.0.8 lib/jets/lambda/functions.rb
jets-4.0.7 lib/jets/lambda/functions.rb
jets-4.0.6 lib/jets/lambda/functions.rb
jets-4.0.5 lib/jets/lambda/functions.rb
jets-4.0.4 lib/jets/lambda/functions.rb
jets-4.0.3 lib/jets/lambda/functions.rb
jets-4.0.2 lib/jets/lambda/functions.rb
jets-4.0.1 lib/jets/lambda/functions.rb
jets-4.0.0 lib/jets/lambda/functions.rb
jets-3.2.2 lib/jets/lambda/functions.rb
jets-3.2.1 lib/jets/lambda/functions.rb
jets.benforeva-3.0.17.pre.mount.pre.fix lib/jets/lambda/functions.rb
jets-3.2.0 lib/jets/lambda/functions.rb
jets-3.1.5 lib/jets/lambda/functions.rb
jets-3.1.4 lib/jets/lambda/functions.rb
jets-3.1.3 lib/jets/lambda/functions.rb