Class: Jets::Lambda::Functions

Inherits:
Object
  • Object
show all
Includes:
Dsl
Defined in:
lib/jets/lambda/functions.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Dsl

#lambda_functions

Constructor Details

#initialize(event, context, meth) ⇒ Functions

Returns a new instance of Functions.



11
12
13
14
15
16
17
# File 'lib/jets/lambda/functions.rb', line 11

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

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



10
11
12
# File 'lib/jets/lambda/functions.rb', line 10

def context
  @context
end

#eventObject (readonly)

Returns the value of attribute event.



10
11
12
# File 'lib/jets/lambda/functions.rb', line 10

def event
  @event
end

#methObject (readonly)

Returns the value of attribute meth.



10
11
12
# File 'lib/jets/lambda/functions.rb', line 10

def meth
  @meth
end

Class Method Details

.inherited(base) ⇒ Object



28
29
30
31
# File 'lib/jets/lambda/functions.rb', line 28

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

.output_keysObject

Needed for depends_on. Got added due to stagger logic.



34
35
36
# File 'lib/jets/lambda/functions.rb', line 34

def output_keys
  []
end

.subclassesObject

Tracking subclasses because it helps with Lambda::Dsl#find_all_tasks



24
25
26
# File 'lib/jets/lambda/functions.rb', line 24

def subclasses
  @subclasses ||= []
end