jkburges 8f070d58c4
fix(Templates): Add missing property in ruby template (#8195)
This property was previously missing from the fake lambda context when running ruby functions locally.

Ref: https://docs.aws.amazon.com/lambda/latest/dg/ruby-context.html
2020-09-07 11:07:43 +02:00

20 lines
397 B
Ruby

def withRemainingTime(event:, context:)
start = context.get_remaining_time_in_millis()
sleep(0.001)
stop = context.get_remaining_time_in_millis()
{"start" => start, "stop" => stop}
end
def withDeadlineMs(event:, context:)
{"deadlineMs" => context.deadline_ms}
end
module MyModule
class MyClass
def self.my_class_method(event:, context:)
{"foo" => "bar"}
end
end
end