Class: Jets::Builders::ShimVars::Shared

Inherits:
Base
  • Object
show all
Defined in:
lib/jets/builders/shim_vars/shared.rb

Instance Method Summary collapse

Methods inherited from Base

#bundled_zip, #rack_zip, #s3_bucket

Methods included from AwsServices

#apigateway, #aws_lambda, #cfn, #dynamodb, #logs, #s3, #s3_resource, #sns, #sqs, #sts

Methods included from AwsServices::StackStatus

#lookup, #stack_exists?, #stack_in_progress?

Methods included from AwsServices::GlobalMemoist

included

Constructor Details

#initialize(fun) ⇒ Shared

fun is a Jets::Stack::Function



16
17
18
# File 'lib/jets/builders/shim_vars/shared.rb', line 16

def initialize(fun)
  @fun = fun
end

Instance Method Details

#dest_pathObject

IE handlers/shared/functions/bob.js



33
34
35
# File 'lib/jets/builders/shim_vars/shared.rb', line 33

def dest_path
  @fun.handler_dest
end

#functionsObject

Always only one element for shared functions functions: IE [:handle]



22
23
24
# File 'lib/jets/builders/shim_vars/shared.rb', line 22

def functions
  [@fun.meth] # function_names
end

#handler_for(function_name) ⇒ Object

Dont need function_name arg but keeping the same interface as parent class IE handlers/shared/functions/bob.handle



28
29
30
# File 'lib/jets/builders/shim_vars/shared.rb', line 28

def handler_for(function_name)
  @fun.handler_dest
end