Class: Jets::Lambda::Functions

Inherits:
Object
  • Object
show all
Extended by:
Util::Logging
Includes:
ExceptionReporting, Dsl, Util::Logging
Defined in:
lib/jets/lambda/functions.rb

Direct Known Subclasses

Event::Base, Function

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Util::Logging

log

Methods included from Dsl

#lambda_functions

Constructor Details

#initialize(event, context, meth) ⇒ Functions

Returns a new instance of Functions.



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

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 # useful to identify which template to use later.
end

Class Attribute Details

.abstractObject (readonly) Also known as: abstract?

Returns the value of attribute abstract.



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

def abstract
  @abstract
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



12
13
14
# File 'lib/jets/lambda/functions.rb', line 12

def context
  @context
end

#eventObject (readonly)

Returns the value of attribute event.



12
13
14
# File 'lib/jets/lambda/functions.rb', line 12

def event
  @event
end

#methObject (readonly)

Returns the value of attribute meth.



12
13
14
# File 'lib/jets/lambda/functions.rb', line 12

def meth
  @meth
end

Class Method Details

._prefixesObject



44
45
46
# File 'lib/jets/lambda/functions.rb', line 44

def _prefixes
  []
end

.abstract!Object

Define a controller as abstract. See internal_methods for more details.



40
41
42
# File 'lib/jets/lambda/functions.rb', line 40

def abstract!
  @abstract = true
end

.inherited(base) ⇒ Object



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

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

.output_keysObject

Needed for depends_on. Got added due to stagger logic.



54
55
56
# File 'lib/jets/lambda/functions.rb', line 54

def output_keys
  []
end

.subclassesObject

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



49
50
51
# File 'lib/jets/lambda/functions.rb', line 49

def subclasses
  @subclasses ||= []
end

Instance Method Details

#_normalize_options(options) ⇒ Object

Pretty hacky since action_view/rendering.rb _normalize_options calls super



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

def _normalize_options(options) # :doc:
  options
end